zachowj / hass-node-red

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

events: state; expose to Home Assistant initial value always true. #31

Closed paddenstoeltje closed 4 years ago

paddenstoeltje commented 4 years ago

Describe the bug

I'm using a state node (switch), and expose this to Home Assistant in order to create an identity in HA. This works well. However, whenever I deploy an update in Node red, the entity state is always set to true, regardless of it's previous state. The same behaviour can be seen when restarting the home assistant container.

What should happen?

When deploying a flow or when or restarting HA, the entity state should not be changed, it should remain as it was previously set.

Annotation 2020-07-14 123411

paddenstoeltje commented 4 years ago

I assume this is not used to create the entity in HA as such, only to enable/diasble a flow. I will use the entity node instead.