Add service integration.reload

This is already supported use " homeassistant.reload_config_entry" command, give it an entity that’s connected to an integration and integration will be reloaded

I’ve tried this, my case is the Eufy Security integration through HACS. I’ve tried Rest API and even a shell command to run curl. Neither would reload the integration

And Ann me to the list of wanting an integration.reload function

Do you have a reload option available on the integrations page? Not all integrations support reloading, if you don’t see a reload option for that integration on the main page then Rest Api or homeassistant.reload_config_entry will not work.

1 Like

No it has the option to reload. And doing so fixes the issue. Just can’t find a way to automate it

I am looking for this as a use case for restarting/reloading and integration (not an addon), in homeassistant. Can you tell me where and how I can get the “ID” of an integration? Thanks

Right, that’s exactly what the service I linked does. When you add an integration in Home Asssistant it creates a config entry. That’s how it keeps track of what integrations you have added to your particular instance and what values you entered for any settings of that integration. This distinction is also how you are able to add some integrations multiple times (multiple config entries for one particular integration)

Since that post about 6 months ago the service appears to have changed since then. It no longer accepts a config entry ID, instead it accepts the ID of an entity, device or area created for a config entry (i.e. integration). It then uses that to find the corresponding config entry and reloads it.

So you no longer need Node RED for this. Just go to the integration you want to reload with an automation and find an entity connected to it, then use homeassistant.reload_config_entry and pass it to it. You can also get device and area IDs in templates now if you prefer.

though this topic is long closed… I dont understand why you would say that. As someone using:

  reload_tradfri_integration:
    alias: Reload Tradfri integration
    mode: restart
    sequence:
      service: homeassistant.reload_config_entry
      data:
        entry_id: 37702redacted51

multiple times a day (hope the next dev will see a bump in the tradfri library and this wont be needed any longer…) I can say it still works just fine with the entry_id

it only accepts an entry_id:

The thing is I DO want to use node-red :-)…

So this should reload the integration of which the entity is part?

1 Like

Ah gotcha. Yea that’s my understanding. I haven’t used it in a while, I forget what I was doing when I posted that. But based on what others have said above and the doc of that service that should do trick.

So just to clarify, I haven’t used this service in quite a while so I’m really not an expert on it. But given what you’re saying and showing it seems like someone should update the documentation since I assumed it was correctly showing me what inputs it accepts:

As you can see, it lists entity_id, area_id and device_id as options but entry_id is no where to be found.

I can confirm this works and my use case is fulfilled.

2 Likes

Yeah. It’s a bit odd as the ui interface of the service shows other options than the yaml interface .

What I understood meanwhile via Discord, is that one can enter an entity_id of an integration in that service call, which would reload the integration the entity_id belongs to.

Haven’t tested yet though.

1 Like

Would it be too much trouble if I asked you to share the ‘reload integration’ flow? I’m also using nodered in hassio and was researching automatic integration reloading due to (quite frequent) ikea integration fails.

Kind thanks in advance!

It is still there, but missing from the docs.

3 Likes

RBE:
image

TRIGGER:

Thanks, but I meant the whole flow in json format. That way the whole flow/settings get exported.

Anyway will try to redo the flow based on your screen shots as soon as I get some free time.

Cheers!

Just what I was looking for! Thank you!

I have big problems with the Octoprint integration, all 3 instances keep failing sensors every now and then and even after hours do not come back with values.
tried to find the ID with the inspect but can’t find anything can someone help me how I do it?

Add me as a requester! The unifi integration craps out regularly and marks entities as “unknown”. I’d like to be able to automate the reload, instead of having to add an alert and clicking around the UI to make it work again.

Well you can, no need repeating the request for a service that’s been around for a while now…