The below automation used to work perfectly before. I am on Home assistant 2024.7.4. I will appreciate any assistance to make it work again. Thank you.
alias: FrontDoor Dayactivities
description: ""
trigger:
- platform: device
device_id: xxxxx702fbeb1xxxxx13cxxxxxx14c
domain: lock
entity_id: lock.frontdoor_2
type: unlocked
condition:
- condition: time
after: "04:21:00"
before: "19:59:00"
action:
- service: media_player.volume_set
data:
volume_level: 0.81
target:
entity_id: media_player.living_room_show
- service: notify.alexa_media
data:
message: Attention! Front Door is open
target:
- media_player.living_room_show
data:
type: announce
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: notify.alexa_media
data:
message: >-
<audio
src='https://uabuid.nabu.casa/local/audio/greeting.mp3'/>
target:
- media_player.living_room_show
data:
type: tts
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: media_player.volume_set
data:
volume_level: 0.7
target:
entity_id: media_player.living_room_show
mode: single