Skip to content

Instantly share code, notes, and snippets.

View franortiz's full-sized avatar

Francisco Ortiz franortiz

View GitHub Profile
@franortiz
franortiz / tze204_fhvdgeuh.py
Last active July 25, 2025 23:35
zigpy quirk for TS0601 - Circuit Breaker with Current Leakage Detection and Electrical Measurement
"""Tuya 1 Phase Circuit Breaker with Current Leakage Detection and Electrical Measurement."""
"""WIP: Need multi attribute -> DP code for over/under settings"""
from zigpy.quirks.v2 import SensorDeviceClass, SensorStateClass, EntityPlatform, EntityType
from zigpy.quirks.v2.homeassistant import (
UnitOfElectricCurrent,
UnitOfEnergy,
UnitOfPower,
UnitOfTime
)
@franortiz
franortiz / tz3000_cayepv1a.py
Last active August 6, 2025 23:10
zigpy quirk for TS011F Circuit Breaker * Tongou TO-Q-SY2-JZT and others
"""TS011F Circuit Breaker * Tongou TO-Q-SY2-JZT."""
"""Supports HA 2025.08"""
from typing import Any, Optional, Union
import logging
import enum
from struct import (iter_unpack, pack)
from zigpy.profiles import zgp, zha
from zigpy.quirks.v2 import (