Add service integration.reload

it still exists. The .storage folder is hidden.

so you have to ssh? I donā€™t see a way to see it in File editor. in that case watching the network tab is way easier.

You can see it in the vscode addon if you change your folder location via the command pallet.

image
image

You can see it in a samba share w/ the samba share addon.

You can see it in SSH w/ SCP (I believe this can only be done via the community addon but it might be doable in the official addon)

Iā€™m going to try this out using Node Red:

Will see if this helps keep my ZHA devices connected:

Fingers crossed.

you have to give it an entity and not a device for it to reload. Also the integration itā€™s reloading must be in Home Assistant under integrations.

Well, thatā€™s a shame - there are no entities that appear to match apart from ā€˜hubā€™:

I donā€™t think thatā€™s the same as the HubZ Smart Home Controller Iā€™m trying to reload:

Looks like I canā€™t use Node-Red to reload this one. In fact, there is no individual entity or corresponding entity id for this controller, so you have to search for the entry_id in .storage/core.config_entries. Guess Iā€™m adding an automation!

I canā€™t get it to work at all. I first of all check my syntax using the Developer tools. I select the service, check the box to use an entry ID rather than an area, device, or entity, and click call:

Itā€™s the same in YAML mode:

The documentation supports entry_id, but the system does not.

Do I need to raise a ticket for this?

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