I searched around but didn't see any posts about this. Apologies if I missed it. But I have an automation that tells me when my porch door is locked and unlocked. It sends a message via TTS. This works great, but occasionally it resumes music that was paused from earlier. I'm using Music Assistant to pass through the media_player entity. Anyone else have this issue?
Example code:
alias: Door Lock Status Notification
description: Notifies when porch door is locked or unlocked
triggers:
- entity_id: lock.porch_lock
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.to_state.state == 'locked' }}"
sequence:
- action: tts.cloud_say
data:
entity_id: media_player.everywhere
message: >-
The {{ trigger.to_state.attributes.friendly_name}} has been locked.
mode: single