Improve entity type hints [p] (#77871)

This commit is contained in:
epenet 2022-09-06 09:51:33 +02:00 committed by GitHub
parent 6f564e4f51
commit 474844744b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 130 additions and 107 deletions

View file

@ -77,14 +77,14 @@ class MinutPointBinarySensor(MinutPointEntity, BinarySensorEntity):
self._async_unsub_hook_dispatcher_connect = None
self._events = EVENTS[device_name]
async def async_added_to_hass(self):
async def async_added_to_hass(self) -> None:
"""Call when entity is added to HOme Assistant."""
await super().async_added_to_hass()
self._async_unsub_hook_dispatcher_connect = async_dispatcher_connect(
self.hass, SIGNAL_WEBHOOK, self._webhook_event
)
async def async_will_remove_from_hass(self):
async def async_will_remove_from_hass(self) -> None:
"""Disconnect dispatcher listener when removed."""
await super().async_will_remove_from_hass()
if self._async_unsub_hook_dispatcher_connect: