diff --git a/homeassistant/components/toon/__init__.py b/homeassistant/components/toon/__init__.py index 6af3c0e066b..59174cff260 100644 --- a/homeassistant/components/toon/__init__.py +++ b/homeassistant/components/toon/__init__.py @@ -102,7 +102,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: device_registry.async_get_or_create( config_entry_id=entry.entry_id, identifiers={ - (DOMAIN, coordinator.data.agreement.agreement_id, "meter_adapter") + ( + DOMAIN, + coordinator.data.agreement.agreement_id, + "meter_adapter", + ) # type: ignore[arg-type] }, manufacturer="Eneco", name="Meter Adapter", diff --git a/homeassistant/components/toon/config_flow.py b/homeassistant/components/toon/config_flow.py index 9afba2bc2ae..e86d951069c 100644 --- a/homeassistant/components/toon/config_flow.py +++ b/homeassistant/components/toon/config_flow.py @@ -20,8 +20,8 @@ class ToonFlowHandler(AbstractOAuth2FlowHandler, domain=DOMAIN): DOMAIN = DOMAIN VERSION = 2 - agreements: list[Agreement] | None = None - data: dict[str, Any] | None = None + agreements: list[Agreement] + data: dict[str, Any] @property def logger(self) -> logging.Logger: diff --git a/homeassistant/components/toon/models.py b/homeassistant/components/toon/models.py index e39faa1efc6..301e3c06233 100644 --- a/homeassistant/components/toon/models.py +++ b/homeassistant/components/toon/models.py @@ -39,8 +39,8 @@ class ToonElectricityMeterDeviceEntity(ToonEntity): agreement_id = self.coordinator.data.agreement.agreement_id return DeviceInfo( name="Electricity Meter", - identifiers={(DOMAIN, agreement_id, "electricity")}, - via_device=(DOMAIN, agreement_id, "meter_adapter"), + identifiers={(DOMAIN, agreement_id, "electricity")}, # type: ignore[arg-type] + via_device=(DOMAIN, agreement_id, "meter_adapter"), # type: ignore[typeddict-item] ) @@ -53,8 +53,8 @@ class ToonGasMeterDeviceEntity(ToonEntity): agreement_id = self.coordinator.data.agreement.agreement_id return DeviceInfo( name="Gas Meter", - identifiers={(DOMAIN, agreement_id, "gas")}, - via_device=(DOMAIN, agreement_id, "electricity"), + identifiers={(DOMAIN, agreement_id, "gas")}, # type: ignore[arg-type] + via_device=(DOMAIN, agreement_id, "electricity"), # type: ignore[typeddict-item] ) @@ -67,8 +67,8 @@ class ToonWaterMeterDeviceEntity(ToonEntity): agreement_id = self.coordinator.data.agreement.agreement_id return DeviceInfo( name="Water Meter", - identifiers={(DOMAIN, agreement_id, "water")}, - via_device=(DOMAIN, agreement_id, "electricity"), + identifiers={(DOMAIN, agreement_id, "water")}, # type: ignore[arg-type] + via_device=(DOMAIN, agreement_id, "electricity"), # type: ignore[typeddict-item] ) @@ -81,8 +81,8 @@ class ToonSolarDeviceEntity(ToonEntity): agreement_id = self.coordinator.data.agreement.agreement_id return DeviceInfo( name="Solar Panels", - identifiers={(DOMAIN, agreement_id, "solar")}, - via_device=(DOMAIN, agreement_id, "meter_adapter"), + identifiers={(DOMAIN, agreement_id, "solar")}, # type: ignore[arg-type] + via_device=(DOMAIN, agreement_id, "meter_adapter"), # type: ignore[typeddict-item] ) @@ -96,7 +96,7 @@ class ToonBoilerModuleDeviceEntity(ToonEntity): return DeviceInfo( name="Boiler Module", manufacturer="Eneco", - identifiers={(DOMAIN, agreement_id, "boiler_module")}, + identifiers={(DOMAIN, agreement_id, "boiler_module")}, # type: ignore[arg-type] via_device=(DOMAIN, agreement_id), ) @@ -110,8 +110,8 @@ class ToonBoilerDeviceEntity(ToonEntity): agreement_id = self.coordinator.data.agreement.agreement_id return DeviceInfo( name="Boiler", - identifiers={(DOMAIN, agreement_id, "boiler")}, - via_device=(DOMAIN, agreement_id, "boiler_module"), + identifiers={(DOMAIN, agreement_id, "boiler")}, # type: ignore[arg-type] + via_device=(DOMAIN, agreement_id, "boiler_module"), # type: ignore[typeddict-item] ) diff --git a/mypy.ini b/mypy.ini index e6f82ba957e..04c5b6f05e2 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2801,15 +2801,6 @@ ignore_errors = true [mypy-homeassistant.components.template.sensor] ignore_errors = true -[mypy-homeassistant.components.toon] -ignore_errors = true - -[mypy-homeassistant.components.toon.config_flow] -ignore_errors = true - -[mypy-homeassistant.components.toon.models] -ignore_errors = true - [mypy-homeassistant.components.withings] ignore_errors = true diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index f86fd447722..9984eeeb405 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -68,9 +68,6 @@ IGNORED_MODULES: Final[list[str]] = [ "homeassistant.components.sonos.statistics", "homeassistant.components.template.number", "homeassistant.components.template.sensor", - "homeassistant.components.toon", - "homeassistant.components.toon.config_flow", - "homeassistant.components.toon.models", "homeassistant.components.withings", "homeassistant.components.withings.binary_sensor", "homeassistant.components.withings.common",