Add service integration.reload

no, entry_id is the entry_id, it has nothing to do with device or entity_id’s.

it also doesn’t need to be redacted as it’s just a value that HA uses to identify the item

to get the entry_id, put this in developer tools → template

{{ config_entry_id('switch.laundry') }}

I’ll state this again to be clear. With the correct and valid entry_id in the Developer tools, the general message returned is The service requires a target, please select a target from the picker for the UI mode, or This service requires a target, please define a target entity_id, device_id, or area_id under target: or data: for YAML mode.

Do I need to raise a bug report?

just do this

service: homeassistant.reload_config_entry
target: {}
data:
  entry_id: 8955375327824e14ba89e4b29cc3ec9a

and if you can’t send an empty target via node-red, don’t use node-red. Your automation is so simple you wouldn’t even need node red.

trigger:
- platform: time
  at: "02:15"
action:
- service: homeassistant.reload_config_entry
  target: {}
  data:
    entry_id: 8955375327824e14ba89e4b29cc3ec9a

I have tested your syntax and it worked:

service: homeassistant.reload_config_entry
target: {}
data:
  entry_id: 5819b5e0e0061f4346afed4f65e9811d

I’ve added the details to an automation and will test.

It worked:

I’ll likely keep this automation running until I can get ZHA on the Hubz stable.

Arent you supposed to be able to to

service: homeassistant.reload_config_entry
target: {}
data:
  entity_id: switch.laundry

and it would reload the integration that creates that entity_id? No need for those config entry numbers, are lookups, the system would do that for you?

Yes you can use it either way. However, the entry_id (not entity_id) is for reloading an entire integration.

I also find that reloading the entity_id reloads the entire integration.

Yes that’s what I meant , it’s designed like that

So you use the correct service and any entity_id for that integration.

I’ll have to test this out!

@fantangelo @Mariusthvdb @DeanSmith That depends upon how the integration is written, that is the case with some but not others, and the entry_id is only found in the config file - if there is one there at all for the integration.

So this is all really helpful.

But, would there be a way to blanket reload ALL integrations at once using a button helper?

The problem I’m having is sporadic at best and irregular. What I would like is to be able to ask my voice assistant to reload all the integrations at once. To do this, I’ve set up a virtual button helper shows shows up as a scene that can be activated by the voice assistant. Once activated, HA recognizes it as a ‘button press’ and then can execute an automation.

This is what I have come up with so far; it only reloads a single integration. As you can see, I also have HA send me a push notification to acknowledge that it is reloading the integrations.

I would rather not have to add an entity for each integration, and make a whole list.

alias: "Reload Integrations when Trigger is Pressed"
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.integrations_reload_trigger
condition: []
action:
  - service: homeassistant.reload_config_entry
    data: {}
    target:
      entity_id: switch.pool_lid_relay_1
  - service: notify.notify
    data:
      title: ❗️ HomeAssistant ALERT ❗️
      message: >-
        🔄 HomeAssistant is now reloading your integrations. Please wait for
        everything to come back online.
mode: single

My goal is to not have to find an entity for each and every integration when calling for the reload. I want a blanket reload on everything that doesn’t use a restart of HA as a whole.

TIA

Agreed. That’s exactly what I was trying to figure out. I’ll probably have to make a script or automation based off of a template that monitors entities that go unavailable for “x” period of time. Then use another template in the action to pull the entities id and run a Home Assistant Core Integration Reload All. Basically running a reload of all yaml configuration without restarting the entire box.

I usually don’t have too much of an issue as I already have a daily simple reboot and weekly database purge and full system restart occur.

1 Like

Reloading all integrations is basically a restart.

There is a homeassistant.restart service.

What is this sporadic issue?

1 Like

A purist would say, “Don’t do that, find the root of the issue!”, but we have to live in the real world!

1 Like

The issue is mostly with the Tuya, VeSync, & Overkiz integrations, but sometimes also with Hue.

Every few weeks some device(s) stops following the scheduled automations. More often than not, reloading the integration once resolves this issue.

This is not a reauthentication problem.

I’d rather not restart the whole thing if i can get away with it, but If necessary I could schedule a 3am reboot weekly. (I’ve had problems in the past with scheduling reboots bricking my whole system so im fairly reticent to go that route.)

With so many integrations giving you issues this is more likely a networking issue. I’ve never read of issues with the Hue integration on the forum (even though I don’t use it).

Perhaps, but I already attempted to find a correlation with network issues. No Dice.

Hue has problems so infrequently but I added it to my list for completion purposes.

Thanks, this helped me out reload the efergy (power monitoring) integrations whenever the sensors decide to go unavailable.

See the following post where I try to come up with a way to do this in lovelace with a card & a script. Integration Reload w/Card & Script - no luck so far. I may have missed it above but the service call with an entity_id does not seem to support templates for the entity_id.