Advice for an Audio Notification when a Door is Opened

Hi Community,

I’m considering replacing my early 90s ADT home security system with Konnected. However, one feature that I want to retain is the whole house announcement when certain doors or windows are opened. I can take care of the sensor part, but I’m seeking advice on a clean way to the audio notifications.

Currently the ADT system plays a, “ Front Door” when the front door is opened. The “ ” is nice because it tells you to pay attention to the upcoming announcement of the door/window that was opened.

Q1: I understand that I can do a if/then automation with the notify integration for every sensor/event that I want to notify on, but I was wondering if there was a more elegant solution. I am imagining something where HA knows the name of the sensor and generates the “notification string”.

Q2: Is there a way to nicely prepend the “notification string” with the “ ” chime?

I do not think I can make use of the ADT keypad speaker through Konnected, so I’ll likely use some Home Assistant Voice devices I have.

Thanks in advance!

There are a number of ways:

Satellite Announce action
Music Assistant Play Announcement action
Chime TTS

The exact templates and actions that you will need to have the door/window name announced depend on a number of factors like the notification integration you are using, so you will need to provide more information if you want something specific… the basic outline for the automation could be something like:

triggers:
  - trigger: state
    to: 'on'
    entity_id:
      - binary_sensor.door_front
      - binary_sensor.door_back
      - binary_sensor.door_side
conditions: []
actions:
  - action: assist_satellite.announce
    target:
      entity_id: 
        - assist_satellite.m5_atom_echo_01
        - assist_satellite.voice_pe_01
    data:
      message: "{{ trigger.to_state.attributes.friendly_name }}"
      preannounce: true

Thank you. This is exactly what I was looking for. I’ll give it a shot.

Also, I just noticed that I had used some markup for the chimes and it was removed from my post. I think you got the gist of what I was asking for anyway. Thanks, again!

How do I set the preannounce_media_id?

I created /media/Store_Door_Chime.mp3 and it plays fine via my browser from Media (left menu) → My Media, but I cannot figure out what to put in the YAML.

I tried many paths, like below, with no luck:

    data:
      message: '{{ trigger.to_state.attributes.friendly_name }} was opened'
      preannounce: true
      preannounce_media_id: /media/Store_Door_Chime.mp3

Once working is there any reason to use any media format over another? For example mp3 vs wav…

I may have inadvertently led you astray… Since most of my target devices are in Music Assistant, I’ve been using tts.speak through MA which has a built-in pre-announce chime.

Normally, you would use something like the following for a media ID:

media-source://media_source/local/Store_Door_Chime.mp3

I would assume the preannounce_media_id would follow the same format. But, It seems like the pre-announce feature hasn’t been fully fleshed out. I can play media instead of a TTS message, but I can’t seem to get it to play pre-announce media followed by TTS on either of my assist satellites. Maybe it is limited to certain hardware at the moment…

Thanks, again. This worked. Any reason to do .mp3 or .wav or to prefer some other format?

For completeness, here’s my YAML.

    data:
      message: '{{ trigger.to_state.attributes.friendly_name }} was opened'
      preannounce: true
      preannounce_media_id: media-source://media_source/local/Store_Door_Chime.mp3

That’s great, but kind of weird that it’s working for you but not working for me… what hardware are you using for you satellites?

Not that I know of.

I’m just using a Home Assistant Voice as I play around.

I’d be happy to share more of my config with you, just let me know if I can help in any other way.

I brought a second Home Assistant Voice online and added it, as a second target/entity_id, to my automation and it won’t play the chime.