-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State Toggle functionality #9
Comments
I had this exact same problem, what I did was add a flag (trigger = true) before the node that requests the state, after I get a response I check if the trigger is set, when is a automatic trigger that flag is not set, and I ignore the message.
This node is very useful, but I really miss a option to no auto trigger (or a separated node to incoming messages and requests) a feedback of errors on the nodes (so that I can retry if a timeout occurs) and the toggle option. |
Hi, |
Hi, it's the first time i really use github for code modify. Jean-Paul |
Some extra 'space' will give unsucces travis tool. |
Is there a way to implement a Toggle functionality?
What I mean is if the light is ON, then switch it OFF or if it is OFF then switch it ON.
I tried to implement it by first querying the state and then to request the opposite state. The problem is, that as soon as the new state is implemented, the node which I used to query the current state, acts on the new state and sends the opposite state. Thus creating an endless loop!
My use case is in fact a physical toggle button which the wife wants to press to toggle the state :)
Thanks for a great node.
The text was updated successfully, but these errors were encountered: