mirror of
https://github.com/home-assistant/core.git
synced 2025-06-23 22:47:09 +00:00
Fix Fully Kiosk service call config entry handling (#85275)
* Make sure we're getting the fully_kiosk config entry * Make sure we're getting the fully_kiosk config entry
This commit is contained in:
parent
bdcccd9d83
commit
cf92142b64
@ -47,10 +47,19 @@ async def async_setup_services(hass: HomeAssistant) -> None:
|
||||
for target in call.data[ATTR_DEVICE_ID]:
|
||||
device = registry.async_get(target)
|
||||
if device:
|
||||
coordinator = hass.data[DOMAIN][list(device.config_entries)[0]]
|
||||
# fully_method(coordinator.fully, *args, **kwargs) would make
|
||||
# test_services.py fail.
|
||||
await getattr(coordinator.fully, fully_method.__name__)(*args, **kwargs)
|
||||
for key in device.config_entries:
|
||||
entry = hass.config_entries.async_get_entry(key)
|
||||
if not entry:
|
||||
continue
|
||||
if entry.domain != DOMAIN:
|
||||
continue
|
||||
coordinator = hass.data[DOMAIN][key]
|
||||
# fully_method(coordinator.fully, *args, **kwargs) would make
|
||||
# test_services.py fail.
|
||||
await getattr(coordinator.fully, fully_method.__name__)(
|
||||
*args, **kwargs
|
||||
)
|
||||
break
|
||||
|
||||
async def async_load_url(call: ServiceCall) -> None:
|
||||
"""Load a URL on the Fully Kiosk Browser."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user