Improve entity type hints [t] (#77883)

This commit is contained in:
epenet
2022-09-06 13:35:52 +02:00
committed by GitHub
parent 0c767bd0d3
commit 458001a06e
29 changed files with 67 additions and 60 deletions

View File

@@ -411,7 +411,7 @@ class TraccarEntity(TrackerEntity, RestoreEntity):
"""Return the source type, eg gps or router, of the device."""
return SourceType.GPS
async def async_added_to_hass(self):
async def async_added_to_hass(self) -> None:
"""Register state update callback."""
await super().async_added_to_hass()
self._unsub_dispatcher = async_dispatcher_connect(
@@ -445,7 +445,7 @@ class TraccarEntity(TrackerEntity, RestoreEntity):
}
self._battery = attr.get(ATTR_BATTERY)
async def async_will_remove_from_hass(self):
async def async_will_remove_from_hass(self) -> None:
"""Clean up after entity before removal."""
await super().async_will_remove_from_hass()
self._unsub_dispatcher()