Hi I made an automation with a motion detection that put the lights on or off.
It works but now and then the light goes on and immediate goes off again.
So it is like the automation is doing the 2 triggers after each other. => on =>off.
What did I wrong in my automation?
alias: Motion inkom licht aan/uit
description: ""
triggers:
- trigger: state
entity_id:
- sensor.mw_inkom
to: Detected
id: inkom aan
- trigger: state
entity_id:
- sensor.mw_inkom
to: Clear
id: inkom uit
for:
hours: 0
minutes: 1
seconds: 0
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- inkom aan
- condition: sun
before: sunrise
before_offset: "+02:00:00"
after: sunset
after_offset: "-01:00:00"
sequence:
- type: turn_on
device_id: 4d9e1e905b3f2ca86c6aa19938ac38d6
entity_id: da7729a830c90b7e7be8fc6ef04e3b62
domain: switch
- conditions:
- condition: trigger
id:
- inkom uit
sequence:
- type: turn_off
device_id: 4d9e1e905b3f2ca86c6aa19938ac38d6
entity_id: da7729a830c90b7e7be8fc6ef04e3b62
domain: switch
mode: single