Improve entity type hints [o] (#77826)

This commit is contained in:
epenet 2022-09-06 10:25:35 +02:00 committed by GitHub
parent d6ca3544ee
commit ea71a462d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 68 additions and 58 deletions

View file

@ -106,14 +106,14 @@ class OpenThermSensor(SensorEntity):
self._friendly_name = friendly_name_format.format(gw_dev.name)
self._unsub_updates = None
async def async_added_to_hass(self):
async def async_added_to_hass(self) -> None:
"""Subscribe to updates from the component."""
_LOGGER.debug("Added OpenTherm Gateway sensor %s", self._friendly_name)
self._unsub_updates = async_dispatcher_connect(
self.hass, self._gateway.update_signal, self.receive_report
)
async def async_will_remove_from_hass(self):
async def async_will_remove_from_hass(self) -> None:
"""Unsubscribe from updates from the component."""
_LOGGER.debug("Removing OpenTherm Gateway sensor %s", self._friendly_name)
self._unsub_updates()