I have a Marantz amp set up, but I would like to trigger an automation (to adjust it’s volume) based on the source it’s playing.
I know it’s a very basic question, but I’m tearing my hair out trying to find the answer. I’ve been playing around for a few months and have the hang of automating most of the house, but I’m stuck on one fundamental. I also can’t work out the right terminology to search for an answer, so I thought I’d give up and ask.
In device manager I can see a bunch of ‘variables’ for the device, and I’d like to trigger on the current source. I have automations on the ‘state’ but need the next layer down. What is the correct way to reference these ‘variables’?
I tried using media_player.marantz_sr5008_source and media_player.marantz_sr5008|source for the device name to reference (approaches I found in random unverified code snippets online) but with no luck.
I’e seen some examples of setting up a separate variable for these attributes in the config and then referencing that. Is that what I should be doing, or is there a way to do it directly from the device variables using templates or similar?
You sir are a legend. This is already helping me streamline all of my automations as this was one example of many where I couldn’t work out the attribute format. Thank you.
For any one who stumbles on this thread in the future, my ultimate solution finished up as the below. Note: The True/False sections allow me to trigger it for changing source away from “LMS” rather than onto it.
I feel like I really should have a better handle on the automations side of things after 4 months using this… that will teach me for spending my time making a pretty floor map front end, and flashing sonoff switches, to visually convince the wife this automation is a good idea :).