As with everything I do I am trying to do something I think is complicated. In my project, I have custom template sensors for satellite devices. It looks something like this:
- sensor:
- name: ViewAssist-kitchen
state: ""
attributes:
type: view_audio
mode: "normal"
mic_device: "sensor.viewassist_kitchen_stt"
mediaplayer_device: "media_player.viewassist_kitchen"
musicplayer_device: "media_player.viewassist_kitchentsv"
display_device: "sensor.viewassist_kitchen_browser_path"
browser_id: "ViewAssist-kitchen"
I want to trigger an automation if this template sensor's mediaplayer_device entity (ie media_player.viewassist_kitchen) attribute is_volume_muted changes (can be either true or false).
I am hoping that this can be done with a template trigger. I have this template that will return the value but I do not know how to write the trigger:
state_attr((state_attr('sensor.viewassist_masterbedroom', 'mediaplayer_device')), 'is_volume_muted'
Any help is most appreciated.