|
| 1 | +"""Candeo modules.""" |
| 2 | + |
| 3 | +from zigpy.quirks.v2 import QuirkBuilder |
| 4 | + |
| 5 | +from zhaquirks.candeo import CANDEO, CandeoBasicCluster, CandeoSwitchType |
| 6 | + |
| 7 | +( |
| 8 | + QuirkBuilder(CANDEO, "C203") |
| 9 | + .applies_to(CANDEO, "HK-LN-DIM-A") |
| 10 | + .applies_to(CANDEO, "C204") |
| 11 | + .applies_to(CANDEO, "C-ZB-DM204") |
| 12 | + .applies_to(CANDEO, "C205") |
| 13 | + .replaces(CandeoBasicCluster) |
| 14 | + .enum( |
| 15 | + attribute_name=CandeoBasicCluster.AttributeDefs.external_switch_type.name, |
| 16 | + enum_class=CandeoSwitchType, |
| 17 | + cluster_id=CandeoBasicCluster.cluster_id, |
| 18 | + translation_key="external_switch_type", |
| 19 | + fallback_name="External switch type", |
| 20 | + ) |
| 21 | + .add_to_registry() |
| 22 | +) |
| 23 | + |
| 24 | +( |
| 25 | + QuirkBuilder(CANDEO, "C-ZB-SM205-2G") |
| 26 | + .replaces(CandeoBasicCluster, endpoint_id=11) |
| 27 | + .enum( |
| 28 | + attribute_name=CandeoBasicCluster.AttributeDefs.external_switch_type.name, |
| 29 | + enum_class=CandeoSwitchType, |
| 30 | + cluster_id=CandeoBasicCluster.cluster_id, |
| 31 | + endpoint_id=11, |
| 32 | + translation_key="external_switch_type", |
| 33 | + fallback_name="External switch type", |
| 34 | + ) |
| 35 | + .add_to_registry() |
| 36 | +) |
0 commit comments