This is a very well hidden feature. The website just gives a veneer of documentation.
How do I reload the nextcloud integration? It takes longer to start than even HA so after a complete server restart it’s lagging behind and HA complains about being unable to reach it.
Found this thread and was temporarily happy.
Using
You can get the entry_id in the core.config.entities file located in the .storage folder. There may be a easier way, but you can definitely get it there.
Thank you for your hint.
I already looked there; .storage/core.config_entries contains just the integrations managed through the UI; nextcloud is YAML.
Found nothing in .storage/core.device_registry, nothing in .storage/core.entity_registry.
I followed the link which @Frenck added here in the post and it works as a charm. Just follow the link. I made a automation and a script with it and it perfectly works !
I will share my script to reload. As said earlier I followed the link of Frenck. Selected the device (you can find the device name in your Devices. I made a automation for reload on time and a script which I use for a button card. Here is the script.yaml:
Hmm, you’re reloading a UI-configured device-bound integration.
My need is the reload of a YAML-configured device-less integration without a device_id (from .storage)…
returns a “unknown error”, perhaps either because this doesn’t work for YAML-integrations or because the Onkyo integration does not create unique IDs for the media_player entities and has no option to do so.
And yeah, there is already a open github issue for the Onkyo integration because it requires the Onkyo receiver to be powered and connected while Home Assistant reboots, if its not, entities for Zone2 and Zone3 are getting deleted. This is rather frustrating and there seems to be no solution.
Any suggestions on how to automate this to occur for a specific device/config entry after a restart of Home Assistant?
I have an automation to restart the HA host weekly and have an integration that tends to need a reload to properly display the data in my dashboard.
I’d like to reload that integration after the restart, and once everything is up and running again.
Logger: homeassistant.helpers.script.websocket_api_script
Source: components/homeassistant/__init__.py:268
First occurred: 12. März 2023, 16:44:19 (8 occurrences)
Last logged: 17:46:19
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: There were no matching config entries to reload
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 762, in admin_handler
await result
File "/usr/src/homeassistant/homeassistant/components/homeassistant/__init__.py", line 268, in async_handle_reload_config_entry
raise ValueError("There were no matching config entries to reload")
ValueError: There were no matching config entries to reload
This solution neither works for integrations that create no entities, nor for integrations that create no unique IDs (I guess).
My usecase is that of an Axis IP camera which I only turn on when alarm is enabled. I ended up doing a script that powers the camera on using a smart socket, waits 40s and then calls the reload_config_entry service.
While using the reload_config_entry works (on the device entity), the notification warning in the UI does not go away (I wish it did, because if the service does exactly the same as clicking the reload button then it should probably disappear). Is that expected ?
I’d LOVE to be rid of the 2 EXTRA and bogus Zones the Onkyo integration generated!
Btw if you haven’t looked yet you might want to consider moving to the HACS version of the Onkyo integration. He added async support that and HOPEFULLY will eventually generate unique IDs.
Sorry for the late answer, but i tried out two different HACS integrations. This One seems to be just a revamp of the old configuration.yaml based integration but with the new async backend but This one additionally has the config flow added, which means you can now set it up through the UI, it generates unique IDs so you can just deactivate the entities of zone2 and zone3. This HACS integration is probably the best for you, since you dont want those additional zones.
The second one has a few quirks regarding zone2 / zone3 but if you dont use those, it shouldnt bother you!