mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Verisure unpack (#98605)
This commit is contained in:
parent
d3ee2366b0
commit
89705a22cf
@ -83,7 +83,8 @@ class VerisureDataUpdateCoordinator(DataUpdateCoordinator):
|
|||||||
raise UpdateFailed("Could not read overview") from err
|
raise UpdateFailed("Could not read overview") from err
|
||||||
|
|
||||||
def unpack(overview: list, value: str) -> dict | list:
|
def unpack(overview: list, value: str) -> dict | list:
|
||||||
return next(
|
return (
|
||||||
|
next(
|
||||||
(
|
(
|
||||||
item["data"]["installation"][value]
|
item["data"]["installation"][value]
|
||||||
for item in overview
|
for item in overview
|
||||||
@ -91,6 +92,8 @@ class VerisureDataUpdateCoordinator(DataUpdateCoordinator):
|
|||||||
),
|
),
|
||||||
[],
|
[],
|
||||||
)
|
)
|
||||||
|
or []
|
||||||
|
)
|
||||||
|
|
||||||
# Store data in a way Home Assistant can easily consume it
|
# Store data in a way Home Assistant can easily consume it
|
||||||
self._overview = overview
|
self._overview = overview
|
||||||
|
Loading…
x
Reference in New Issue
Block a user