How to turn off siren after motion stops

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.

  1. Motion detected turns on porch light
  2. 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:

1 Like

Hi,

  • add another trigger for clearance of your motion sensor
  • add ID’s to your triggers
  • never use devices but entities
  • use these ID’s in your actions ‘as triggered by’

As stated in How to help us help you - or How to ask a good question → Format it properly use YAML code instead of pictures.

2 Likes