Improve entity type hints [t] (#77883)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user