|
9 | 9 | from zigpy.zcl.foundation import BaseAttributeDefs, ZCLAttributeDef
|
10 | 10 |
|
11 | 11 | from zhaquirks import LocalDataCluster
|
12 |
| -from zhaquirks.tuya import TuyaManufClusterAttributes, TuyaPowerConfigurationCluster2AAA |
| 12 | +from zhaquirks.tuya import ( |
| 13 | + BatterySize, |
| 14 | + TuyaManufClusterAttributes, |
| 15 | + TuyaPowerConfigurationCluster2AAA, |
| 16 | +) |
13 | 17 | from zhaquirks.tuya.builder import TuyaQuirkBuilder
|
14 | 18 |
|
15 | 19 |
|
@@ -60,8 +64,23 @@ def _update_attribute(self, attrid, value):
|
60 | 64 | .applies_to("_TZE284_rccxox8p", "TS0601")
|
61 | 65 | .applies_to("_TZE200_vzekyi4c", "TS0601")
|
62 | 66 | .applies_to("_TZE204_vawy74yh", "TS0601")
|
| 67 | + .tuya_smoke(dp_id=1) |
| 68 | + .skip_configuration() |
| 69 | + .add_to_registry() |
| 70 | +) |
| 71 | + |
| 72 | +( |
| 73 | + TuyaQuirkBuilder("TZE200_0zaf1cr8", "TS0601") |
63 | 74 | .applies_to("_TZE284_0zaf1cr8", "TS0601")
|
64 | 75 | .tuya_smoke(dp_id=1)
|
| 76 | + .tuya_binary_sensor( |
| 77 | + dp_id=14, |
| 78 | + attribute_name="battery_low", |
| 79 | + device_class=BinarySensorDeviceClass.BATTERY, |
| 80 | + entity_type=EntityType.DIAGNOSTIC, |
| 81 | + fallback_name="Battery low", |
| 82 | + ) |
| 83 | + .tuya_battery(dp_id=15, battery_type=BatterySize.CR123A, battery_qty=1) |
65 | 84 | .skip_configuration()
|
66 | 85 | .add_to_registry()
|
67 | 86 | )
|
|
0 commit comments