Skip to content
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

Add Tuya TS0603 garage door module _TZE608_fmemczv1 #3607

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions zhaquirks/tuya/ts0603_garage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Tuya garage door opener."""

from zigpy.quirks.v2.homeassistant.binary_sensor import BinarySensorDeviceClass
import zigpy.types as t

from zhaquirks.tuya import TUYA_CLUSTER_ID
from zhaquirks.tuya.builder import TuyaQuirkBuilder

(
TuyaQuirkBuilder("_TZE608_fmemczv1", "TS0603")
.tuya_dp_attribute(
dp_id=1,
attribute_name="garage_door_button",
type=t.Bool,
)
.write_attr_button(
attribute_name="garage_door_button",
cluster_id=TUYA_CLUSTER_ID,
attribute_value=0x01,
translation_key="garage_door_button",
fallback_name="Garage door button",
)
.tuya_binary_sensor(
dp_id=3,
device_class=BinarySensorDeviceClass.GARAGE_DOOR,
attribute_name="garage_door",
translation_key="garage_door",
fallback_name="Garage door",
)
.skip_configuration()
.add_to_registry()
)
Loading