Let’s assume I wrote three different automations for light in three separate rooms. May each automation use the trigger id “motion detected”? Will one automation affect the other?
Thank you
An.drea
Let’s assume I wrote three different automations for light in three separate rooms. May each automation use the trigger id “motion detected”? Will one automation affect the other?
Thank you
An.drea
No your other automations will not be affected.
Thank you very much.
I’d like to “escalate” my question:
Let’s assume I’ve got an automation that uses three different motion sensors as triggers. Is it good practice to assign all three triggers the same trigger id, so I can use one condition only in a if-then action?
platform: state
entity_id:
- binary_sensor.bewegungsmelder_01_occupancy
from: "off"
to: "on"
id: bewegung-and-erkannt
for:
hours: 0
minutes: 0
seconds: 0
enabled: true
platform: state
entity_id:
- binary_sensor.bewegungsmelder_02_occupancy
from: "off"
to: "on"
id: bewegung-and-erkannt
for:
hours: 0
minutes: 0
seconds: 0
enabled: true
…
alias: >-
Bei Pausen-Ende oder Bewegung erkannt: Licht, Lautsprecher, Fußheizung &
USB-Lader einschalten
if:
- condition: trigger
id:
- and-pause-schaltet-aus
- bewegung-and-erkannt
then:
- alias: Licht einschalten
service: switch.turn_on
Totally fine to do. Just set your automation mode to parallel or queued.
You didn’t post the third trigger, but if they are all the same, except for the entity IDs, you can just list all the entity IDs under one trigger and drop the zero for
constraint.
Good idea, thank you.