Reloading all integrations is basically a restart.
There is a homeassistant.restart
service.
What is this sporadic issue?
Reloading all integrations is basically a restart.
There is a homeassistant.restart
service.
What is this sporadic issue?
A purist would say, āDonāt do that, find the root of the issue!ā, but we have to live in the real world!
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.
Please do this feature.
After a power outage, some integrations stop working so this feature will be amazing ā¦ as I donāt need to check if they work or not.
Some integrations require a reload from time to time.
Itās already available on many integrations.
Whatās about the homeassistant.reload_config_entry
action?
nevermind, this was already posted multiple times above
Iām using node-red to do this by leaving the entity_id empty and writing the entry_id in the data field.
This type of comment does not help; worse, it is misleading.
The majority of integrations cannot reload programmatically (using actions that can be used in automation); some examples of integrations that Iām using that donāt have this capability are Broadlink, Ecoflow-cloud, Landroid-cloud, Midea Smart AC, Roborock, Smartthings, Watchman and many more; like 99% of all integrations.
Please do your research before chastising people for āunhelpfulā comments.
Even though you listed mostly custom integrations (not made by HA), every single integration you listed can be reloaded with an automation using homeassistant.reload_config_entry
action.
This action reloads the broadlink integration.
- action: homeassistant.reload_config_entry
target:
entity_id: remote.bonus_room_remote
Every integration that is set up in the UI can be reloaded with this service.
The yaml heavy hitters (Most used) can all be reloaded with their own service.
At this point, the only integrations that cannot be reloaded are old yaml integrations that havenāt seen updates in years.
I get your point; however, you are missing my point.
To reiterate, I want (and Iām not alone) a way to reload an integration.
Currently, what is available is helpful, but it has a couple of flows, such as the need to specify all the entities/devices related to integration.
I would expect something like this:
action: homeassistant.reload_integration
target:
integration_id: smartthings
This will allow us to write feature-proof automation; whenever a new device is added or removed, the automation doesnāt need to be updated.
No. You just use a single entity from the integration and it will reload the entire thing. If you have multiple integrations of it, then youād need multiple entities.
Hmm, maybe it is a bug in that case; I just retested (now) using:
action: homeassistant.reload_config_entry
data: {}
target:
entity_id: switch.0_lv1_power_outlet_1
this being an entity part of the HomeKit devices. Only that entity was reset, not even all entities part of the same device. All the other devices from the HomeKit devices list have not been reloaded.
To reiterate, even if this will work ā¦ this is not a future-proof solution as when this entity is deleted you will need to update the automation.
It depends on the integration, if each device creates a separate instance of the integration, then youād need to add all the devices. But that doesnāt make any sense because theyād have a different connection and thereād be no reason to reload them all if youāre having issues with 1.
Did you read the link I posted? I donāt think so, you can also use the entry_id. You donāt need to use entity_id, you can use anything target accepts.
Iāve read the documentation, however; you are missing my point or unwilling to understand what Iām saying.
When an issue happens it happens with one or multiple integrations (for example after a power outage). I rarely had issues with only one device.
For the stuff that is working on Home Assistant, please consider adding the ability to reload an integration that is based only on an integration identifier.
Iām not missing the point, you keep moving the bar even though you can do exactly what youāre saying. You can reload integrations, entry_id is akin to integration name.
After a power outage, I have 3 integrations that need to be reloaded because they donāt recover, guess what I use? This service with 3 entry_ids.
Sorry that the current implementation doesnāt meet your standards.
Hereās a script that will reload all config entries associated with an integration.
reload_integration:
alias: Reload an entire integration
mode: parallel
fields:
integration:
description: Integration
selector:
text:
variables:
entities: "{{ integration_entities(integration) }}"
sequence:
- condition: template
value_template: "{{ entities | count > 0 }}"
- action: homeassistant.reload_config_entry
target:
entity_id: "{{ entities }}"
using itā¦
action: script.reload_integration
data:
integration: smartthings
or if you want to reload just a specific config entry without needing to know the entry_idā¦
reload_config:
alias: Reload an instance of an integration
mode: parallel
fields:
entry:
description: Config to reload
selector:
config_entry:
sequence:
- condition: template
value_template: "{{ entry is defined and entry }}"
- action: homeassistant.reload_config_entry
target:
entry_id: "{{ entry }}"
Both usable from the UI.
Any update on this?
For me the above does seem to āworkā and reload the entries.
However what it doesnāt do and what I need is the same as clicking reload on the integration entries.