Skip to content
Snippets Groups Projects
Commit e4cda9ae authored by Ville Skyttä's avatar Ville Skyttä Committed by Martin Hjelmare
Browse files

Fix Huawei LTE error message on service call without URL and routers (#30250)

parent 59fee12b
No related branches found
No related tags found
No related merge requests found
......@@ -439,6 +439,9 @@ async def async_setup(hass: HomeAssistantType, config) -> bool:
routers = hass.data[DOMAIN].routers
if url:
router = routers.get(url)
elif not routers:
_LOGGER.error("%s: no routers configured", service.service)
return
elif len(routers) == 1:
router = next(iter(routers.values()))
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment