ich nutze einen Bewegungsmelder von Xiaomi, um das Licht im Flur zu schalten. Jetzt habe ich hin und wieder das Problem, dass das Licht angeschaltet und sofort wieder ausgeschaltet wird. Jemand eine Idee warum das passiert? Hier mal die Automatisierung dazu:
Code: Alles auswählen
alias: Flur EG Licht an bei Bewegung
description: ''
trigger:
- platform: state
entity_id: binary_sensor.presence_81
to: 'on'
condition:
- condition: and
conditions:
- condition: sun
after: sunset
- condition: time
after: '16:00'
before: '21:00'
action:
- service: homeassistant.turn_on
target:
entity_id: switch.flur_eg
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.presence_81
to: 'off'
timeout: '3:00'
- service: homeassistant.turn_off
target:
entity_id: switch.flur_eg
mode: restart