Automation for door chime

Does anyone have some examples of their automation to make the piezo buzzer chime when the door opens/closes? I can get the buzzer to chime when the door opens but having difficulty getting it to shut off.


Here is the automation I was using with the delay.  It was set to play the chime for 2 seconds, however in reality it was always something like 5 seconds.  However, it became unreliable, and I would have to turn the chimes off manually,

- id: '1531025654050'

  alias: Opened Door


  - entity_id: group.doors

    from: 'off'

    platform: state

    to: 'on'

  condition: []


  - data:

      entity_id: group.alarm_chimes

    service: switch.turn_on

  - delay: 00:00:02

  - data:

      entity_id: group.alarm_chimes

    service: switch.turn_off

I posted a message on the other thread with what I am doing now.

Hope this helps, and maybe someone has a better way to do it than me.

Here’s how I built my automation for door-open chimes using the Konnected Piezo on Out1. Works well and is easily configurable.

Add Trigger: Entity for the doors you want to have chime. Multiple drops down menus will become available.
Set the From state Closed, and To state Open
I left For blank, as this just creates a delay before the beeps begin.

And If
Add Condition: Alarmo (in my case) is disarmed

Then do
Add Action: Light Turn on Alarm Panel Pro
Add Action: Delay for x time (I used 1 second, which is good for 4-45 beeps). Note, you’ll have to search for Delay as an Action, but it comes right up.
Add Action: Turn light off on Alarm Panel Pro


Yes with HAos built in Automations it is very easy to do things: