remote_homeassistant: Proxy Services broken in HA 2023.6
Proxy Services seems broken in HA 2023.6. I use it to forward evohome_cc services from slave to the main instance. The error on the main is always the same with a random KeyError value. With a browser Home Assistant starts and continuous to work until I hit F5 and it’s stuck in an endless loop. The companion app results directly in an endless loop of HA.
Issue on Home Assistant 2023.6.1 docker and core Last working instance: Home Assistant core 2023.5.3
The errors doesn’t trace back to proxy services, but after lot’s of debugging I narrowed it down to disable the proxy services and made it stable. I also can reproduced the same behavior between 2 different systems in a test environment.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 382, in handle_get_services
payload = await _async_get_all_descriptions_json(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 363, in _async_get_all_descriptions_json
descriptions = await async_get_all_descriptions(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 614, in async_get_all_descriptions
domain_yaml = loaded[domain]
~~~~~~^^^^^^^^
KeyError: 'rest'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 382, in handle_get_services
payload = await _async_get_all_descriptions_json(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 363, in _async_get_all_descriptions_json
descriptions = await async_get_all_descriptions(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 614, in async_get_all_descriptions
domain_yaml = loaded[domain]
~~~~~~^^^^^^^^
KeyError: 'text'
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 18
The problem is with a change in the ‘get all services call’ a few releases ago. This call is used by Lovelace for I think the quick menu to quickly start a service. The problem is that you probably have components in your remote system that are not available in your main one, for example ones from HACS or platforms (such as sensor, switch, etc. but I don’t expect that). The services exposed by the custom components on the remote are not known by the main HA and that makes it fail to load. Unfortunately, for now, the only workaround (which I use because it works in my scenario) is to setup the same integration on the main and just use a dummy implementation so that at least the services of that particular integration are known by the main HA. But… as you said that you have on cloud instance, you probably doesn’t want or cannot load those instances in the main one.
Maybe this can be a start for a developer to have a look at it (maybe I can do it myself but can’t promise anything). In technical terms, the problem is that the service descriptions of integrations that only exist in the remote one are not available in the main one.
The workaround from @Wesley-Vos works for me in other cases, but it doesn’t work with the custom integration ramses_cc which started the problem for me. To bypass the issue I have changed my setup of devices and I don’t need proxy services any more.
To try if it’s still a problem for others I have tested the custom integration but it can’t be loaded as a dummy and the custom services won’t be created. Proxy services are needed in that case. The workaround can work in a lot of situations, but I think it is still a bug.