Description
What happened
As per manual it says that when continuous motion is detected, it won't send an event until no motion is detected again for 1 minute. After that it will restore no motion status and will go into "working mode".
I can see both events, the first motion detected and the other no motion that triggers after 1 minute of last motion detected. However the false event implemented in fix 2818(triggered after 90) is throwing of the automation if the room is occupied for more then 90 seconds.
What did you expect to happen
I cannot replicate the issue reported on #2818 where the "status is always occupied in Home Assistant even after leaving the device stay in an empty room for a day" and I'm getting occupied false after 60s of non motion as expected.
How to reproduce it (minimal and precise)
- trigger the motion sensor. The occupancy: true will be reported accordingly.
- keep movement in front of sensor for >90 seconds. the false event is triggered as per issue fix 2818. This will trigger any lights to turn off incorrectly in automations.
- stop the movement and after 60s the sensor will report correctly occupancy: false as expected.
Debug info
_Zigbee2MQTT:info 2021-01-10 22:24:22: MQTT publish: topic 'zigbee2mqtt/Motion PIR Sensor', payload '{"battery":100,"battery_low":false,"linkquality":84,"occupancy":true,"tamper":false}' ---Trigger motion sensor
Zigbee2MQTT:info 2021-01-10 22:25:52: MQTT publish: topic 'zigbee2mqtt/Motion PIR Sensor', payload '{"battery":100,"battery_low":false,"linkquality":84,"occupancy":false,"tamper":false}' ---FALSE EVENT 90s after first event
Zigbee2MQTT:info 2021-01-10 22:27:10: MQTT publish: topic 'zigbee2mqtt/Motion PIR Sensor', payload '{"battery":100,"battery_low":false,"linkquality":78,"occupancy":false,"tamper":false}' ---Actual 1min after no motion
Zigbee2MQTT version: 1.17.0
Adapter hardware: CC2531
Adapter firmware version: CC2531_DEFAULT_20190608
Activity