-
Notifications
You must be signed in to change notification settings - Fork 879
Add Senoro door sensor _TZE200_ytx9fudw
#4086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
f2e06f7
cb4f638
22cf16a
e942166
5551725
279c604
8c320b1
ad38153
a4f90d8
a7a3654
dc95999
b787e26
d8c0497
ab16b88
ca6d775
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Module for Senoro quirks implementations.""" | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"""Sensoro Window Sensor (TS0601).""" | ||
|
||
from zigpy.quirks.v2.homeassistant import EntityPlatform, EntityType | ||
import zigpy.types as t | ||
|
||
from zhaquirks.tuya import BatterySize | ||
from zhaquirks.tuya.builder import TuyaQuirkBuilder | ||
|
||
|
||
class OpeningStateEnum(t.enum8): | ||
"""Enum for opening state.""" | ||
|
||
open = 0 | ||
closed = 1 | ||
tilted = 2 | ||
TheJulianJES marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
|
||
( | ||
TuyaQuirkBuilder("_TZE200_ytx9fudw", "TS0601") | ||
.tuya_battery( | ||
dp_id=2, | ||
battery_type=BatterySize.CR2032, | ||
battery_qty=3, | ||
) | ||
.tuya_enum( | ||
dp_id=101, | ||
attribute_name="opening_state", | ||
enum_class=OpeningStateEnum, | ||
translation_key="opening_state", | ||
fallback_name="Opening state", | ||
TheJulianJES marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
ChristianGr1974 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
entity_type=EntityType.STANDARD, | ||
entity_platform=EntityPlatform.SENSOR, | ||
) | ||
.tuya_switch( | ||
dp_id=16, | ||
attribute_name="alarm", | ||
entity_type=EntityType.STANDARD, | ||
|
||
translation_key="alarm", | ||
fallback_name="Tamper Alarm", | ||
TheJulianJES marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
) | ||
.skip_configuration() | ||
.add_to_registry() | ||
) |
Uh oh!
There was an error while loading. Please reload this page.