I want to turn an input_boolean on and then turn it right back off again. I just need node red to see the state changed for split second to run my flow.
Right now I have two separate service calls to turn the boolean on and then off. But is there a one shot service call? I thought toggle may do it, but that just changes its state to the opposite of whatever it currently is. I also tried homeassistant.toggle
Yah I can toggle it twice. Im not looking for a way to accomplish the task. Im just wondering if there a service calls that performs a “turn on, turn off” action, in one.
Its not a big deal to add two toggles or ON and then off; im just wondering if there is a single service call to accomplish it.
All of an input_boolean’s services are listed here:
There is no single service call that performs the action you want. As far as I know, no other domain (light, switch, lock, cover, etc) has such a service either.
Why would anyone ever need smart light switch when they can just get up and turn the light on themselves? Convenience. I’m just asking a question here, not looking for a debate on what one person deems necessary.
FWIW, I’ve used another home automation system (for over a decade) and it has the concept of a ‘momentary boolean’. When you set it to on it immediately sets itself back to off (it does it natively so there’s no need for a turn_on/turn_off service call, a simple turn_on does the trick). It creates a ‘pulse’ that typically serves to execute something.