#Tuya zigbee presence sensor only recognized as router
1 messages · Page 1 of 1 (latest)
(Note that I'm pretty new to zigbee, i only added a couple of buttons, water-leak sensors and a motion detection unit.)
This is the device info screen.
i suspect is not supported, will be useful if you have more info like link there is some name... zha quirks may need updated but you will need help from soneone who knows about these things
It's not been added to zha yet, there is a pr here https://github.com/zigpy/zha-device-handlers/pull/3679 you can test if you want to set up custom quirks, see forums for details on how.
Thanks @surreal pivot and @wanton halo .
I will look into that custom quirks thing. (If I read it correct I have to doubly thank prairie as he seems to have added the code for this device) 🙏🙏
It's not tested, I don't have the device but it is based on what z2m does and will likely work, if you run into issues post on the PR.
Do I copy the entire file where the custom quirks fingerprint is in to my local zha_quirks folder or only the section with my sensor. I tried to copy only my sensor. Starting from
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_muvkrjr5']),
........
Ending with:
[103, 'fading_time', tuya.valueconverter.raw],
],
},
},
But that did not work.
I'm confused at what you are copying there
You need the top half with the imports
and this portion
(
TuyaQuirkBuilder("_TZE204_muvkrjr5", "TS0601")
.tuya_dp(
dp_id=1,
ep_attribute=TuyaOccupancySensing.ep_attribute,
attribute_name=OccupancySensing.AttributeDefs.occupancy.name,
converter=lambda x: x == 1,
)
.adds(TuyaOccupancySensing)
.tuya_number(
dp_id=13,
attribute_name="detection_distance_max",
type=t.uint16_t,
device_class=SensorDeviceClass.DISTANCE,
unit=UnitOfLength.METERS,
min_value=1.5,
max_value=6.0,
step=0.75,
multiplier=0.01,
translation_key="detection_distance_max",
fallback_name="Maximum range",
)
.tuya_number(
dp_id=16,
attribute_name="move_sensitivity",
type=t.uint16_t,
min_value=68,
max_value=90,
step=1,
translation_key="move_sensitivity",
fallback_name="Motion sensitivity",
)
.tuya_sensor(
dp_id=19,
attribute_name="distance",
type=t.uint16_t,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.DISTANCE,
unit=UnitOfLength.CENTIMETERS,
entity_type=EntityType.STANDARD,
translation_key="distance",
fallback_name="Target distance",
)
.tuya_binary_sensor(
dp_id=101,
attribute_name="led_indicator",
translation_key="led_indicator",
fallback_name="LED indicator",
)
# 102 is ignored, per z2m
.tuya_number(
dp_id=103,
attribute_name="fading_time",
type=t.uint16_t,
device_class=SensorDeviceClass.DURATION,
unit=UnitOfTime.SECONDS,
min_value=3,
max_value=1799,
step=1,
translation_key="fading_time",
fallback_name="Fading time",
)
.skip_configuration()
.add_to_registry()
)