1
1
"""Smoke Sensor."""
2
2
3
- from zigpy .quirks .v2 import QuirkBuilder
3
+ from zigpy .quirks .v2 import EntityType , QuirkBuilder
4
+ from zigpy .quirks .v2 .homeassistant .binary_sensor import BinarySensorDeviceClass
4
5
import zigpy .types as t
5
6
from zigpy .zcl .clusters .general import OnOff , Time
6
7
from zigpy .zcl .clusters .lightlink import LightLink
@@ -55,7 +56,6 @@ def _update_attribute(self, attrid, value):
55
56
TuyaQuirkBuilder ("_TZE200_aycxwiau" , "TS0601" )
56
57
.applies_to ("_TZE200_dq1mfjug" , "TS0601" )
57
58
.applies_to ("_TZE200_m9skfctm" , "TS0601" )
58
- .applies_to ("_TZE200_ntcy3xu1" , "TS0601" )
59
59
.applies_to ("_TZE200_rccxox8p" , "TS0601" )
60
60
.applies_to ("_TZE284_rccxox8p" , "TS0601" )
61
61
.applies_to ("_TZE200_vzekyi4c" , "TS0601" )
@@ -68,7 +68,15 @@ def _update_attribute(self, attrid, value):
68
68
69
69
(
70
70
TuyaQuirkBuilder ("_TZE204_ntcy3xu1" , "TS0601" )
71
+ .applies_to ("_TZE200_ntcy3xu1" , "TS0601" )
71
72
.tuya_smoke (dp_id = 1 )
73
+ .tuya_binary_sensor (
74
+ dp_id = 4 ,
75
+ attribute_name = "tamper" ,
76
+ device_class = BinarySensorDeviceClass .TAMPER ,
77
+ entity_type = EntityType .DIAGNOSTIC ,
78
+ fallback_name = "Tamper" ,
79
+ )
72
80
.tuya_dp (
73
81
dp_id = 14 ,
74
82
ep_attribute = TuyaPowerConfigurationCluster2AAA .ep_attribute ,
0 commit comments