Generic/template switch with assumed state?

Hi there,

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.

Do you have any ideas?

Thanks! Andreas

I coudn’t find anything. So, I decided to go for a change in the codebase. Hopefully, this will make it to the release soon:

+1
exactly I am looking for

If you know your way through the various automatic checks that failed on my PR, I’m happy if you can help out!