Create automation to reload the integration

Home Assistant itself is generally stable; however, certain integrations may occasionally freeze. In such instances, it becomes necessary to reload them. Fortunately, Home Assistant offers a solution to detect when an integration has frozen and enables the creation of an automation to trigger its reload.

Configuration

As soon as I’m faced with freezing “COMFOCONNECT LAN C” automation for my recuperator, I use it for the example.

Let’s proceed to create an automation.

Navigate to “Settings” -> “Automation and Scenes” and click the “+ CREATE AUTOMATION” button located in the bottom right corner of the screen, then select “Create a new automation”.

Firstly, you need to set up a trigger for the automation. Click the “+ ADD TRIGGER” button and select the “State” type for it:


A frozen integration can be identified by the “Unknown” state of the corresponding Entity.

Let’s proceed to configure our trigger by adding the Entity name to the “Entity” attribute and defining “Unknown” as the state change “To”. Additionally, I recommend adding a name to the “Trigger ID” field, as it’s very useful for conditional actions.

With the trigger configured, we now need to set up an action that will be triggered by it.

Click the “+ ADD ACTION” button at the bottom of your screen, and locate the “Home Assistant Core Integration: Reload config entry” action type by typing “reload” in the searching field.

Finally, you should configure which integration would be reloaded by the action, so click “+ Choose Entity” button and find it.  

In my case it’s “CompfoAirQ” integration, but you should configure your own one.

Now please save, name your new integration, and enjoy it.