Skip to content

Instantly share code, notes, and snippets.

@franortiz
franortiz / tz3000_cayepv1a.py
Last active December 10, 2025 01:00
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 (
@vinzent
vinzent / zg-204zs.py
Last active January 29, 2025 13:08
zg-204zs.py
"""Luminance motion sensor ZG-204ZS"""
from typing import Dict, Final
from zigpy.quirks.v2 import QuirkBuilder
import zigpy.types as t
from zigpy.zcl.clusters.measurement import IlluminanceMeasurement, OccupancySensing
from zigpy.zcl.clusters.security import IasZone
from zigpy.zcl.clusters.general import Identify
@vinzent
vinzent / zg-204zm.py
Last active June 15, 2025 13:21
Tuya PIR+MMWaver Presence sensor ZG-204M ZHA Quirk for HomeAssistant
"""
* TS0601 ZG-204ZM
* _TZE200_kb5noeto
* Works with HA 2024.11 - updated by @txip (Update 2)
* https://de.aliexpress.com/item/1005006174074799.html ("Color": Mmwave PIR)
* https://github.com/13717033460/zigbee-herdsman-converters/blob/6c9cf1b0de836ec2172d569568d3c7fe75268958/src/devices/tuya.ts#L5730-L5762
* https://www.zigbee2mqtt.io/devices/ZG-204ZM.html
* https://smarthomescene.com/reviews/zigbee-battery-powered-presence-sensor-zg-204zm-review/
* https://doc.szalarm.com/zg-205ZL/cntop_zigbee_sensor.js
* https://github.com/Koenkk/zigbee2mqtt/issues/21919
@ZerNico
ZerNico / wake-up-light-alarm-with-colored-sunrise-effect.yaml
Last active June 19, 2025 21:30
Home Assistant Blueprint: Wake-up light alarm with colored sunrise effect
blueprint:
name: Wake-up light alarm RGB
description: 'A wake-up light alarm with a brightness and color sat sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.