EDIT: See the next message for a Blueprint of this approach
One issue I have perpetually had with my multiroom audio setup using Chromecast is that inevitably my amplifier volumes and the chromecast volumes get out of sync.
For example, someone will be in a room and the audio will be too loud in that room. Rather than adjusting the Chromecast volume, they will lower the volume using the amplifier’s knob (or remote control) in that room. Later someone will notice the volume is too low in that room but rather than adjusting the amplifier volume, they’ll bump up the Chromecast volume. Or vice-versa – in any case, eventually the volume on the amplifer ends up set way too low and maxing out the chromecast is still barely audible.
It just occurred to me today that I could use Home Assistant to automate fixing this in a pretty simple and intuitive way.
I created an automation that will forward / proxy volume changes from the Chromecast to the amplifier so that it is easier to get the whole range of volume exposed.
This is a very simple automation, it monitors the Chromecast volume and if someone sets the volume above 99% (e.g. to 100%), it calls volume_up
service on the corresponding amplifier and resets the Chromecast volume to 98.
Such a simple thing but solves a real annoyance that I’ve had for years!
Here is the YAML:
alias: Volume Management for TV Chromecast
description: ''
trigger:
- platform: numeric_state
entity_id: media_player.chromecast
above: '0.99'
attribute: volume_level
condition: []
action:
- service: media_player.volume_up
target:
entity_id: media_player.downstairs_tx_rz820
- service: media_player.volume_set
target:
entity_id:
- media_player.chromecast
data:
volume_level: 0.98
mode: single
In my experience the problem has always been that the amplifier volume is too low rather than too high, so I only automated the increase side rather than doing both high and low.