Remove omnilogic from mypy ignore list (#74452)
parent
da133a7f05
commit
3922141f5c
|
@ -2,6 +2,7 @@
|
|||
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from omnilogic import OmniLogic, OmniLogicException
|
||||
|
||||
|
@ -122,7 +123,7 @@ class OmniLogicEntity(CoordinatorEntity[OmniLogicUpdateCoordinator]):
|
|||
self._unique_id = unique_id
|
||||
self._item_id = item_id
|
||||
self._icon = icon
|
||||
self._attrs = {}
|
||||
self._attrs: dict[str, Any] = {}
|
||||
self._msp_system_id = msp_system_id
|
||||
self._backyard_name = coordinator.data[backyard_id]["BackyardName"]
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
"""Definition and setup of the Omnilogic Sensors for Home Assistant."""
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
|
@ -34,7 +36,8 @@ async def async_setup_entry(
|
|||
continue
|
||||
|
||||
for entity_setting in entity_settings:
|
||||
for state_key, entity_class in entity_setting["entity_classes"].items():
|
||||
entity_classes: dict[str, type] = entity_setting["entity_classes"]
|
||||
for state_key, entity_class in entity_classes.items():
|
||||
if check_guard(state_key, item, entity_setting):
|
||||
continue
|
||||
|
||||
|
@ -248,7 +251,7 @@ class OmniLogicORPSensor(OmnilogicSensor):
|
|||
return orp_state
|
||||
|
||||
|
||||
SENSOR_TYPES = {
|
||||
SENSOR_TYPES: dict[tuple[int, str], list[dict[str, Any]]] = {
|
||||
(2, "Backyard"): [
|
||||
{
|
||||
"entity_classes": {"airTemp": OmniLogicTemperatureSensor},
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Platform for Omnilogic switch integration."""
|
||||
import time
|
||||
from typing import Any
|
||||
|
||||
from omnilogic import OmniLogicException
|
||||
import voluptuous as vol
|
||||
|
@ -34,7 +35,8 @@ async def async_setup_entry(
|
|||
continue
|
||||
|
||||
for entity_setting in entity_settings:
|
||||
for state_key, entity_class in entity_setting["entity_classes"].items():
|
||||
entity_classes: dict[str, type] = entity_setting["entity_classes"]
|
||||
for state_key, entity_class in entity_classes.items():
|
||||
if check_guard(state_key, item, entity_setting):
|
||||
continue
|
||||
|
||||
|
@ -229,7 +231,7 @@ class OmniLogicPumpControl(OmniLogicSwitch):
|
|||
raise OmniLogicException("Cannot set speed on a non-variable speed pump.")
|
||||
|
||||
|
||||
SWITCH_TYPES = {
|
||||
SWITCH_TYPES: dict[tuple[int, str], list[dict[str, Any]]] = {
|
||||
(4, "Relays"): [
|
||||
{
|
||||
"entity_classes": {"switchState": OmniLogicRelayControl},
|
||||
|
|
9
mypy.ini
9
mypy.ini
|
@ -2741,15 +2741,6 @@ ignore_errors = true
|
|||
[mypy-homeassistant.components.nzbget.switch]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.omnilogic.common]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.omnilogic.sensor]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.omnilogic.switch]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.onvif.base]
|
||||
ignore_errors = true
|
||||
|
||||
|
|
|
@ -48,9 +48,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||
"homeassistant.components.nzbget.config_flow",
|
||||
"homeassistant.components.nzbget.coordinator",
|
||||
"homeassistant.components.nzbget.switch",
|
||||
"homeassistant.components.omnilogic.common",
|
||||
"homeassistant.components.omnilogic.sensor",
|
||||
"homeassistant.components.omnilogic.switch",
|
||||
"homeassistant.components.onvif.base",
|
||||
"homeassistant.components.onvif.binary_sensor",
|
||||
"homeassistant.components.onvif.camera",
|
||||
|
|
Loading…
Reference in New Issue