How to - Input Boolean auto off?

I have a couple door open google speaker broadcasts. There are times when I want to turn them off when I have people coming in and out. I created an input Boolean that I can activate with google voice and it does turn off my broadcasts automations just fine. I cant however figure out how to get that input Boolean to return itself to the off state. Ideally I just need it to turn on for a sec and then back off. Any suggestions on how I can do this please?

The following automation detects when the input_boolean has turned on for at least 1 second and then turns it off.

alias: Auto Off Input Boolean
trigger:
- platform: state
  entity_id: input_boolean.whatever
  to: 'on'
  for: '00:00:01'
action:
- service: input_boolean.turn_off
  target:
    entity_id: input_boolean.whatever
4 Likes

Thank you. Much appreciated.

1 Like