diff --git a/homeassistant/components/updater/binary_sensor.py b/homeassistant/components/updater/binary_sensor.py index 93d19029992..1c6bacede62 100644 --- a/homeassistant/components/updater/binary_sensor.py +++ b/homeassistant/components/updater/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Home Assistant Updater binary sensors.""" +from __future__ import annotations from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.helpers.update_coordinator import CoordinatorEntity @@ -28,14 +29,14 @@ class UpdaterBinary(CoordinatorEntity, BinarySensorEntity): return "updater" @property - def is_on(self) -> bool: + def is_on(self) -> bool | None: """Return true if the binary sensor is on.""" if not self.coordinator.data: return None return self.coordinator.data.update_available @property - def extra_state_attributes(self) -> dict: + def extra_state_attributes(self) -> dict | None: """Return the optional state attributes.""" if not self.coordinator.data: return None diff --git a/mypy.ini b/mypy.ini index b1cd49b82bb..671a6cbc9a7 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1722,9 +1722,6 @@ ignore_errors = true [mypy-homeassistant.components.unifi.*] ignore_errors = true -[mypy-homeassistant.components.updater.*] -ignore_errors = true - [mypy-homeassistant.components.upnp.*] ignore_errors = true diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 9ec3a3b2fff..5f456829725 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -170,7 +170,6 @@ IGNORED_MODULES: Final[list[str]] = [ "homeassistant.components.tradfri.*", "homeassistant.components.tuya.*", "homeassistant.components.unifi.*", - "homeassistant.components.updater.*", "homeassistant.components.upnp.*", "homeassistant.components.velbus.*", "homeassistant.components.vera.*",