Improve entity type hints [o] (#77826)
This commit is contained in:
parent
d6ca3544ee
commit
ea71a462d6
20 changed files with 68 additions and 58 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue