I am trying to get a new automation working with a motion sensor and the Aeotec Siren 6. I got it to work but I can’t turn off the siren. I know there must be a duration setting but I am not smart enough to figure it out.
Motion detected turns on porch light
Motion detected turns on siren
but need to incorporate a way to set duration of siren. I am not proficient in coding. Perhaps I need to add another action? Any help appreciated. Thank you.
UPDATE: I triggered it again and the siren only stayed on for a few seconds
please don’t use screenshots to post code. follow these instructions:
to turn off a siren, use siren.turn_off
to delay for a set period of time, use delay:
(you can choose “wait” in the gui automation builder)
for many motion automation like lights, folks like to run it until the motion stops, so you’d have a “motion off” for some period of time. but for a siren i can imagine you might not want to do that…
also you will benefit from not using device_id, but instead use entites. in the ui builder, choose the green far right choice. and for your trigger, don’t choose “device” but instead choose “state” and choose the binary_sensor as the entity whose state is changing. see this: