Automatically Restart Integration

Is there anyway to automatically check to see if an integration is running and if not automatically reload it. I have an integration that occasionally stops working. To get round this I have set HA to restart every hour via an automation.

Not good! :thinking:

You might be better off tracking down the reason why the integration is stopping. Which one is it? Is it a custom one?

1 Like

Try reloading the integration until root cause is fixed.

You can use homeassistant.reload_config_entry service for this purpose

Thanks - I have amended the automation so that it just reloads this integration

Can you show me your automation yaml

Thanks rien

This is action for my specific integration, is not valid for you of course.

action:
  - service: homeassistant.reload_config_entry
    data: {}
    target:
      entity_id: sensor.niro_data
1 Like