I am trying to "hijack" a media player so that when it receives an announcing request, something else is done before the announcement gets played. It seems like the Universal Media Player can be used to do this, so I tried a minimal configuration:
media_player:
- platform: universal
unique_id: testmediaplayer
name: TestMediaPlayer
device_class: speaker
commands:
play_media:
action: system_log.write
data:
level: error
message: "Announce={{announce}} URL={{media_content_id}}"
However it seems unable to get the attribute named announce like said in the media_player documentation (see the image). Is it possible to get that using UMP or I should do it some way else?