As a complete noob, I am struggling to get past the steepest part of the learning curve. Its all up and working but now I want a user switchable logic control switch on the dashboard and interface.
I’ve tried defining an Entity switch.internal_logic which displays on the dashboard but if I turn it off it just goes back on again after a few seconds. Clearly I have missed the point somewhere. Can anyone put me straight before I go nuts please?
That’s because a switch not only needs to actually do something it also needs to have some way of getting a state. If it doesn’t have a way to get a state then it goes back to it’s prior known state. Which in this case is off.
there is another type of “switch” that is kind of “stateless” in that it will switch to on or off and stay that way until you either switch it off or on manually or programatically. That is called an “input_boolean”.
A “real” switch can be switched either manually, programatically or as a feedback from whatever you or HA has determined should be used for the actual state feedback.
One exception is if you manually create a switch in the configuration you can set the option “assumed_state: true” and it will then just assume that the thing you are controlling actually switched state (whether it did or didn’t) and the switch just stay showing on (or off as the case may be). But you won’t get the nice toggle switch anymore you will get two lightning bolt type icons. one for off & one for on.