haben wir hier mehrmals die Woche, am besten mit TriggerIDs arbeiten.
Bsp:
description: ""
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.bwm_occupancy
from: "off"
to: "on"
id: bewegung_erkannt
- trigger: state
entity_id:
- binary_sensor.bwm_occupancy
from: "on"
to: "off"
id: keine_bewegung
for:
hours: 0
minutes: 2
seconds: 0
conditions: []
actions:
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 250
- choose:
- conditions:
- condition: trigger
id:
- bewegung_erkannt
sequence:
- action: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.xy
- conditions:
- condition: trigger
id:
- keine_bewegung
- condition: state
entity_id: light.xy
state: "on"
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.xy
Die Bedingungen dann mit in die Aktionen nehmen, s. mein Bsp.