I recently installed the Pentair Intellicenter custom integration through HACS. Unfortunately, my feature groups do not pull through, so I have attempted to circumvent that drawback by using scenes. I created the following 4 scenes:
Waterfall On
Waterfall Off
Waterslide On
Waterslide Off
Basically, the Waterfall On scene turns on certain entities, and the Waterfall Off scene turns off those same entities. I have a little more investigating I have to do with scenes though as the Waterfall On and Waterslide On scenes double-up on a couple of entities, so would like to make it so that the scenes work nicely together, but that is a future task as they otherwise serve their current functions.
I created a template switch, but it is a switch with separate buttons. I would like to create a switch that works like a typical entity switch with color changing states, if that is possible.
My current switches.yaml
#toggle switch for Waterfall Scene
- platform: template
switches:
waterfall_scene_switch:
turn_on:
service: scene.turn_on
entity_id: scene.waterfall_on
turn_off:
service: scene.turn_on
entity_id: scene.waterfall_off
#toggle switch for Waterslide Scene
- platform: template
switches:
waterslide_scene_switch:
turn_on:
service: scene.turn_on
entity_id: scene.waterslide_on
turn_off:
service: scene.turn_on
entity_id: scene.waterslide_off
This results in these switches (Under Water Feature Switches) instead of something that looks like any of the other entity switches in the screenshot.
TBH, I’m struggling to understand what you are trying to accomplish. Apart from what you write about scenes, what entities do you have - and what would you like to do with them, in what sort of grouped way?
Where switching the switch to the right turns on the “Waterfall Off” scene and flipping the switch to the left turns on the “Waterfall Off” scene.
The reason you don’t have a toggle for your template switches is that you have not provided a value_template to define their states in their configuration.
I tried the following code and it created a toggle switch. If I turn the switch to on (for example to Waterfall On), the switch stays on only momentarily while activating the scene, but doesn’t give me the ability to turn to off to activate the Waterfall Off scene.
I’m wondering if I need to use one of the entities’ states in the value template, because the scene being activated can’t give it a true “on” state…
Okay, the hard part was figuring out the entities to use to set the switch state because the scenes double-up on a couple of entities. I ended up using the pump speeds (as they are separate switches in Home Assistant and Pentair’s app). So, by using the pumps to set the switch state (they only reason these pump speeds would need to be set to on would be in conjunction with the corresponding scene), I was able to create a scene switch with a toggle that works and looks the way I want it to.