I’m trying to make a toggle switch for my chromecast radio player, but i can’t get it working.
My goal is to toggle the radio player with one button press.
I’ve got to scripts to play and stop the radio
Play: script.play_chromecast_radio
Stop: script.stop_chromecast_radio
What is the right way to create such a toggle switch with this two entity’s?
If you wish, I can help you make it return from hell.
The solution I offered is a single, super-simple automation that has been tested and confirmed to be functional. All that’s required is:
Your existing input_boolean.chromecast_radio
Renaming your existing two scripts:
→ script.chromecast_radio_on
→ script.chromecast_radio_off
Adding the automation (shown in my previous post) to wherever you currently store all your automations
Restart Home Assistant to make all changes take effect. Done.
The input_boolean now controls turning the radio on/off (via the scripts).
It’s your choice of course. However, that solution requires the creation of a template switch that effectively duplicates the existing input_boolean. You don’t need two toggles to do the job, just one.
Im using 1 button of external rf remote to control light ON and OFF. i can switch ON and OFF via the home assistant frontend and on the external rf remote. my issue is that i need the home assistant to show the state when i use the external rf button. Using External rf remote; when i press ON, the light ON, state on frontend ON. When I press OFF, the light OFF but home assistant state no change.
here is my binary_sensor config: