parent
10551743d6
commit
adcbd8b115
|
@ -1,6 +1,9 @@
|
|||
"""Support for IKEA Tradfri."""
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from pytradfri import Gateway, RequestError
|
||||
from pytradfri.api.aiocoap_api import APIFactory
|
||||
|
@ -70,7 +73,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType):
|
|||
load_json, hass.config.path(CONFIG_FILE)
|
||||
)
|
||||
|
||||
for host, info in legacy_hosts.items():
|
||||
for host, info in legacy_hosts.items(): # type: ignore
|
||||
if host in configured_hosts:
|
||||
continue
|
||||
|
||||
|
@ -103,7 +106,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType):
|
|||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Create a gateway."""
|
||||
# host, identity, key, allow_tradfri_groups
|
||||
tradfri_data = hass.data.setdefault(DOMAIN, {})[entry.entry_id] = {}
|
||||
tradfri_data: dict[str, Any] = {}
|
||||
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = tradfri_data
|
||||
listeners = tradfri_data[LISTENERS] = []
|
||||
|
||||
factory = await APIFactory.init(
|
||||
|
|
3
mypy.ini
3
mypy.ini
|
@ -1691,9 +1691,6 @@ ignore_errors = true
|
|||
[mypy-homeassistant.components.tplink.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.tradfri.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.tuya.*]
|
||||
ignore_errors = true
|
||||
|
||||
|
|
|
@ -156,7 +156,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||
"homeassistant.components.todoist.*",
|
||||
"homeassistant.components.toon.*",
|
||||
"homeassistant.components.tplink.*",
|
||||
"homeassistant.components.tradfri.*",
|
||||
"homeassistant.components.tuya.*",
|
||||
"homeassistant.components.unifi.*",
|
||||
"homeassistant.components.upnp.*",
|
||||
|
|
Loading…
Reference in New Issue