mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Improve iterable typing (2) (#79296)
* Improve iterable typing (2) * Use collection
This commit is contained in:
parent
3a9ecab98a
commit
249922ba1b
@ -489,7 +489,7 @@ class HomeKit:
|
||||
advertise_ip: str | None,
|
||||
entry_id: str,
|
||||
entry_title: str,
|
||||
devices: Iterable[str] | None = None,
|
||||
devices: list[str] | None = None,
|
||||
) -> None:
|
||||
"""Initialize a HomeKit object."""
|
||||
self.hass = hass
|
||||
|
@ -2,7 +2,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Iterable
|
||||
from collections.abc import Collection, Iterable
|
||||
|
||||
from aiolifx.aiolifx import LifxDiscovery, Light, ScanManager
|
||||
|
||||
@ -17,7 +17,7 @@ from .const import CONF_SERIAL, DOMAIN
|
||||
DEFAULT_TIMEOUT = 8.5
|
||||
|
||||
|
||||
async def async_discover_devices(hass: HomeAssistant) -> Iterable[Light]:
|
||||
async def async_discover_devices(hass: HomeAssistant) -> Collection[Light]:
|
||||
"""Discover lifx devices."""
|
||||
all_lights: dict[str, Light] = {}
|
||||
broadcast_addrs = await network.async_get_ipv4_broadcast_addresses(hass)
|
||||
|
Loading…
x
Reference in New Issue
Block a user