Hi everyone,
this is my first post, please bare with me
I integrated a Tuya ZG-204ZM Presense Sensor into Zigbee2MQTT. It detects whenever someone is in the field of the radar.
It then changes the status to “presence”: true.
I created two automations, one to turn the light on, whenever someone move into the room and another one, to turn the light off, whenever the status changes to “presence”: false,
The problem is, when the light turned off and I walk into the room like 5 or 10 seconds later the light does not turn on again. Even if I stay and move around in the room. I will have to walk out for another 20 seconds or so for before I walk in again. So probably something about the status change in the automation? I assume it must have to do something with the automation because the status itself changes in Zigbee2MQTT.
It might make sense that I post the two automations in here:
Turn Light On
alias: Presence Küche Licht an
description: ""
triggers:
- trigger: time_pattern
seconds: /3
enabled: false
- type: present
device_id: !MY DEVICE_ID_BEWEGUNG
entity_id: !MY ENTITY_ID_BEWEGUNG
domain: binary_sensor
trigger: device
enabled: true
conditions:
- type: is_illuminance
condition: device
device_id: !MY DEVICE_ID_HELLIGKEIT
entity_id: !MY ENTITY_ID_HELLIGKEIT
domain: sensor
below: 300
actions:
- type: turn_on
device_id: !MY DEVICE_ID_LICHT
entity_id: !MY ENTITY_ID_LICHT
domain: light
mode: single
Turn Off Light
alias: Presence Küche Licht aus
description: ""
triggers:
- type: not_present
device_id: !MY DEVICE_ID_BEWEGUNG
entity_id: !MY ENTITY_ID_BEWEGUNG
domain: binary_sensor
trigger: device
enabled: true
conditions: []
actions:
- type: turn_off
device_id: !MY DEVICE_ID_LICHT
entity_id: !MY ENTITY_ID_LICHT
domain: light
mode: single
Maybe it makes sense to combine it in one automation? I am a beginner and need your help.
Thanks everyone