mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Improve omnilogic
generic typing (#84686)
This commit is contained in:
parent
5e04a87cc6
commit
059ecd10a2
@ -20,7 +20,7 @@ from .const import ALL_ITEM_KINDS, DOMAIN
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class OmniLogicUpdateCoordinator(DataUpdateCoordinator):
|
class OmniLogicUpdateCoordinator(DataUpdateCoordinator[dict[tuple, dict[str, Any]]]):
|
||||||
"""Class to manage fetching update data from single endpoint."""
|
"""Class to manage fetching update data from single endpoint."""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -23,7 +23,9 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the sensor platform."""
|
"""Set up the sensor platform."""
|
||||||
|
|
||||||
coordinator = hass.data[DOMAIN][entry.entry_id][COORDINATOR]
|
coordinator: OmniLogicUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][
|
||||||
|
COORDINATOR
|
||||||
|
]
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
for item_id, item in coordinator.data.items():
|
for item_id, item in coordinator.data.items():
|
||||||
|
@ -23,7 +23,9 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the light platform."""
|
"""Set up the light platform."""
|
||||||
|
|
||||||
coordinator = hass.data[DOMAIN][entry.entry_id][COORDINATOR]
|
coordinator: OmniLogicUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][
|
||||||
|
COORDINATOR
|
||||||
|
]
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
for item_id, item in coordinator.data.items():
|
for item_id, item in coordinator.data.items():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user