is there any way to have a generic switch with turn_on and turn_off scripts, and assumed state? So, kind of a template switch, but without the required value_template ?
Background: I have a few pilight switches with bad reception. So, I want to replace the plain pilight configuration by something of the above kind. In the actions I would repeatedly send pilight commands. But as there is no way to retrieve the actual state by a template, it would need to be assumed state.
I guess this would be possible with some input_boolean and complicated cross-scripting with the switch. But I would prefer something clean, i.e. one single entity of type switch.
Nice idea! Except the switch will always be off, right? Iād like to know the state of the switch to determine whether (e.g.) my living room is on or off. Any idea on that?
Btw, there is the template light , which supports optimistic mode, but it does not accept the customized assumed state. So, I canāt switch it on from the UI, if itās on already.
Yes - the switch always reports as off so you certainly canāt use switch.toggle - which is a real pain.
The proper solution is for the code to change and just give us a switch that can run separate on and off sequences. Been waiting this for over a year so I canāt see it happening.
I never heard of optimistic mode - Iāll check it out, thanks.