You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an events: all node and an events: state node, both of which I have checked the box to "expose to home assistant". I can confirm that I see the switches in home assistant and when I toggle them they do what I expect (disable or enable the nodes).
Describe the bug
The issue occurs when I restart home assistant. Whenever home assistant is restarted, it doesn't seem to keep track of what state the switches were in. It always seems to restore the switches back to the same state regardless of what state they were in prior to shutdown. I believe restoring them back to the state they were in last time I deployed that flow in Node RED. It doesn't seem to have anything to do with what state they were actually in at restart, the only way I've been able to change the initial state is by redeploying the flow in Node RED after adjusting the switches
This creates a problem because now I get into situations where the switches are out of sync with node RED. Here's what I see in node RED right now for these two nodes:
Here's the config panel for the node named "Person detected downstairs" that is disabled:
And here's the config panel for the node named "Dark out" that is enabled:
And now here is what I see for those matching switches in HA right now:
You can see that according to Home Assistant the switches are in the exact opposite state which their corresponding nodes are actually in.
This makes it pretty difficult to use this feature in the UI since I obviously have to restart HA pretty often to make changes to it. So when looking at the UI of HA I can't really trust the state I'm seeing without confirming in Node RED.
I would note that its not all bad. It's more important to me that Node RED keeps those nodes in the correct state then that HA does. And if I redeploy the flow in Node RED it keeps the state of my nodes and fixes the switches, it does not restore the nodes to the incorrect state of the switches. Also service calls still work correctly (if I do switch turn on and the switch says on but the node is disabled then the node still re-enables even though the switch state didn't change).
But still I would expect that either the state of the switches restore to what they were after a restart. Or that they're state is set to the state of their matching node in Node RED during startup.
Debug log
Here's the debug log I see during startup creating those switches
Version of the custom_component
0.4.1
Configuration
I have an
events: all
node and anevents: state
node, both of which I have checked the box to "expose to home assistant". I can confirm that I see the switches in home assistant and when I toggle them they do what I expect (disable or enable the nodes).Describe the bug
The issue occurs when I restart home assistant. Whenever home assistant is restarted, it doesn't seem to keep track of what state the switches were in. It always seems to restore the switches back to the same state regardless of what state they were in prior to shutdown. I believe restoring them back to the state they were in last time I deployed that flow in Node RED. It doesn't seem to have anything to do with what state they were actually in at restart, the only way I've been able to change the initial state is by redeploying the flow in Node RED after adjusting the switches
This creates a problem because now I get into situations where the switches are out of sync with node RED. Here's what I see in node RED right now for these two nodes:



Here's the config panel for the node named "Person detected downstairs" that is disabled:
And here's the config panel for the node named "Dark out" that is enabled:
And now here is what I see for those matching switches in HA right now:


You can see that according to Home Assistant the switches are in the exact opposite state which their corresponding nodes are actually in.
This makes it pretty difficult to use this feature in the UI since I obviously have to restart HA pretty often to make changes to it. So when looking at the UI of HA I can't really trust the state I'm seeing without confirming in Node RED.
I would note that its not all bad. It's more important to me that Node RED keeps those nodes in the correct state then that HA does. And if I redeploy the flow in Node RED it keeps the state of my nodes and fixes the switches, it does not restore the nodes to the incorrect state of the switches. Also service calls still work correctly (if I do switch turn on and the switch says on but the node is disabled then the node still re-enables even though the switch state didn't change).
But still I would expect that either the state of the switches restore to what they were after a restart. Or that they're state is set to the state of their matching node in Node RED during startup.
Debug log
Here's the debug log I see during startup creating those switches
The text was updated successfully, but these errors were encountered: