I used a node-red events: state
node to listen for a state change on one of the devices entities. If the entity went unavailable
, I reloaded the integration.
Here is the node-red code I used to reload my Honeywell integration:
[{"id":"785242a0724243c8","type":"api-call-service","z":"fe1a8042.af255","name":"Reload Honeywell","server":"","version":7,"debugenabled":false,"action":"homeassistant.reload_config_entry","floorId":[],"areaId":[],"deviceId":[],"entityId":["climate.home_heat"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"reload_config_entry","x":310,"y":1040,"wires":[[]]},{"id":"8314a70fcf03e689","type":"server-state-changed","z":"fe1a8042.af255","name":"Honeywell Unvlbl","server":"","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["climate.home_heat"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"unavailable","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"5","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":100,"y":1040,"wires":[["785242a0724243c8"],[]]}]
Please note: this was a temporary fix - Integrations should not have to be reloaded if they are working properly. I tried to provide as much information to the integration developer via a GitHub issue to get the integration fixed. The Honeywell integration was fixed and I don’t need this flow anymore (I keep it around as an example).