Home Assistant Supervisor - Restart Add-on?

When using the Restart Add-on action from Home Assistant Supervisor, what exactly does that do?

  1. If the add-on isn’t started, will it start it?
  2. If it’s already started, it should restart it right?
  3. Is there a way to check the state of an add-on with the Home Assistant Supervisor?

I have an add-on that needs to be restarted after Home Assistant starts. This implies it’s already started.

I also have an automation that checks if one of my entities goes Unavailable. If so, it restarts the add-on. What I’m wondering is if restart is gonna do it. Should I start the add-on instead? It seems like if it goes Unavailable, then the add-on isn’t started in the first place.

Settings → Devices & Entities → Integration 'Home Assistant Supervisor → Entities → Filter by ‘running’. They are by default disabled, so you need to enable them

So automation would be (pseudo code)
if not sensor.xxx_running
start_addon
else
restart add-on

1 Like

How can I check if an addon is running? That’s the issue I ran into.

That is what I posted above. You have to enable the sensor for the add-on. See the post above yours.

1 Like

I get it now!

So I have to enable this entity, but once it’s enabled, I’ll finally know the running state! Woo :). That’s way better than guessing if one of the entities goes Unavailable, it’s probably stopped :laughing:.

1 Like

Bam! Now it’s much cleaner than before :wink: