Update: I split the repo into two – ha-cast_volume_tracker and ha-input_number – and structured them so they can be used via HACS.
For the most up-to-date information, please see the README.
Cast Volume Tracker
This component does the following:
- When an individual speaker is off, by default its media player volume will be set to zero – effectively muting it – but its “desired” volume level will be retained
- When an individual speaker turns on, its volume level will be set to its desired volume level
- As a result, you won’t hear the “blip” noise when the device turns on
- When a group turns on, the volume for each of its members will be set to the average value of its members (excluding any members provided in its
members_excluded_when_off
parameter) - During group playback, the volume of all of its members will be kept normalized
The idea is that for all your cast devices, you would setup a cast_volume_tracker
and replace all media_player.volume_set
service calls with cast_volume_tracker.volume_set
. The usage is the same, except that the entity ID should be for the cast_volume_tracker
instead of the media_player
(i.e., cast_volume_tracker.computer_speakers
instead of media_player.computer_speakers
).
Example Configuration
For setting up switches that mute/un-mute the speakers: switches.yaml
Input Number (with template functionality)
This component is to the built-in input_number
what a template switch is to an input boolean. It accomplishes two things:
- Its value can track other entities by way of a template.
- When its value is changed, it can run a script.
Example Configuration
Issues and Pull Requests
- Please report issues on GitHub.
- Pull requests are welcome!