Skip to content

Add Tuya motion sensor _TZE200_agumlajc quirk #4027

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

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
68 changes: 68 additions & 0 deletions zhaquirks/tuya/tuya_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,3 +1610,71 @@ class TuyaMotionDetectionMode(t.enum8):
.skip_configuration()
.add_to_registry()
)


# Mercator Ikuü TS0601 motion sensor (_TZE200_agumlajc)
class LightControlMode(t.enum8):
"""Enum for the light control mode setting (dp_id=105)."""

On = 0
Off = 1
Auto = 2


(
TuyaQuirkBuilder("_TZE200_agumlajc", "TS0601")
.applies_to("_TZE204_agumlajc", "TS0601")
.tuya_temperature(dp_id=1, scale=10)
.tuya_humidity(dp_id=2)
.tuya_illuminance(dp_id=101)
.tuya_number(
dp_id=102,
attribute_name="brightness_threshold",
type=t.uint16_t,
device_class=SensorDeviceClass.ILLUMINANCE,
min_value=0,
max_value=1000,
step=1,
translation_key="brightness_threshold",
fallback_name="Brightness threshold",
)
.tuya_number(
dp_id=103,
attribute_name="motion_hold_time",
type=t.uint16_t,
device_class=SensorDeviceClass.DURATION,
unit=UnitOfTime.SECONDS,
min_value=1,
max_value=3600,
step=1,
translation_key="motion_hold_time",
fallback_name="Motion hold time",
)
.tuya_binary_sensor(
dp_id=104,
attribute_name="motion",
device_class=BinarySensorDeviceClass.MOTION,
entity_type=EntityType.STANDARD,
translation_key="motion",
fallback_name="Motion",
)
.tuya_enum(
dp_id=105,
attribute_name="light_control_mode",
enum_class=LightControlMode,
translation_key="light_control_mode",
fallback_name="Light control mode",
)
.tuya_number(
dp_id=106,
attribute_name="motion_sensitivity",
type=t.uint16_t,
min_value=0,
max_value=100,
step=1,
translation_key="motion_sensitivity",
fallback_name="Motion sensitivity",
)
.skip_configuration()
.add_to_registry()
)
Loading