I looked and looked, and I couldn’t find anything that seemed like something I could piggyback on and utilize. If I missed something, drop the link, and I’ll dive right in.
I’m trying to create an automation to turn up a Media Player (specifically: Chromecast)'s volume by 30 when a switch is turned on (a loud window air conditioner that I have a Generic Thermostat driving its on/off state). And the inverse: down by 30 when it’s turned off. I need to emphasize that I need the volume to change (increase or decrease) by 30, not set to a specific level.
Thanks again, friends and fellow scholars. Any assistance will be thoroughly appreciated.
In case needed or can helpful:
Air Conditioner switch entity: switch.meross_plug_e_mss110_main_channel
Media Player entity: media_player.android_tv_bedroom
Hi @smibrandon, I can’t help you by writing an automation out of the top of my head but maybe this can get you there.
The condition of your automation can be the state of that switch, no?
The action will call a media_player.volume_set in which you can set 0,3 (30%).
HTH
EDIT: oops, increase/decrease… that will need more coding.
Just try this already, post your YAML code and someone else will surely help you.
Needless to say that you need 2 automations; one to increase, the other to decrease.