zachowj / hass-node-red

Companion Component for node-red-contrib-home-assistant-websocket to help integrate Node-RED with Home Assistant Core
MIT License
443 stars 180 forks source link

Switch Node ability to produce Output regardless of state change status #177

Closed gourdo1 closed 1 year ago

gourdo1 commented 1 year ago

I'm trying to automate an old Lutron home lighting system for which state can only be established by polling a web service and parsing some information. I've already built a pair of flows for checking the current state and turning a light on or off reliably.

However, I want to connect this flow to a HA Switch node, so that I can access standard turn_on, turn_off, and toggle functionality. So I set it up, and it actually works quite well, so long as I always use Home Assistant to flip the switch. As soon as I flip the physical switch, the HA Switch node becomes out of sync. As a result, when I use the Switch node's "Output on State Change" checkbox, it won't send output when it thinks it's already in the correct state, even when it isn't.

Short of having to constantly poll the switch for physical changes, it would be helpful in this scenario if there was an option for the Switch node to always produce output regardless of whether HA thinks the switch is currently on or off. That way I can trigger a custom flow which actually checks the current status and always performs the correct operation.

Thanks for your consideration!

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.