mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Add mypy to elkm1. (#55964)
This commit is contained in:
parent
065e858a03
commit
9d2861afe3
@ -1,7 +1,11 @@
|
||||
"""Support the ElkM1 Gold and ElkM1 EZ8 alarm/integration panels."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
import re
|
||||
from types import MappingProxyType
|
||||
from typing import Any
|
||||
|
||||
import async_timeout
|
||||
import elkm1_lib as elkm1
|
||||
@ -197,7 +201,7 @@ def _async_find_matching_config_entry(hass, prefix):
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up Elk-M1 Control from a config entry."""
|
||||
conf = entry.data
|
||||
conf: MappingProxyType[str, Any] = entry.data
|
||||
|
||||
_LOGGER.debug("Setting up elkm1 %s", conf["host"])
|
||||
|
||||
@ -205,7 +209,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
if conf[CONF_TEMPERATURE_UNIT] in (BARE_TEMP_CELSIUS, TEMP_CELSIUS):
|
||||
temperature_unit = TEMP_CELSIUS
|
||||
|
||||
config = {"temperature_unit": temperature_unit}
|
||||
config: dict[str, Any] = {"temperature_unit": temperature_unit}
|
||||
|
||||
if not conf[CONF_AUTO_CONFIGURE]:
|
||||
# With elkm1-lib==0.7.16 and later auto configure is available
|
||||
|
3
mypy.ini
3
mypy.ini
@ -1315,9 +1315,6 @@ ignore_errors = true
|
||||
[mypy-homeassistant.components.doorbird.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.elkm1.*]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.enphase_envoy.*]
|
||||
ignore_errors = true
|
||||
|
||||
|
@ -27,7 +27,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
||||
"homeassistant.components.dhcp.*",
|
||||
"homeassistant.components.directv.*",
|
||||
"homeassistant.components.doorbird.*",
|
||||
"homeassistant.components.elkm1.*",
|
||||
"homeassistant.components.enphase_envoy.*",
|
||||
"homeassistant.components.entur_public_transport.*",
|
||||
"homeassistant.components.evohome.*",
|
||||
|
Loading…
x
Reference in New Issue
Block a user