Adjustment post move to WS in Traccar Server (#111337)

* Adjustment post move to WS in Traccar Server

* Use entry.async_create_background_task
This commit is contained in:
Joakim Sørensen 2024-02-25 16:04:09 +01:00 committed by GitHub
parent 23cf418807
commit a6a0a0c901
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 35 deletions

View file

@ -34,10 +34,7 @@ class TraccarServerEntity(CoordinatorEntity[TraccarServerCoordinator]):
@property
def available(self) -> bool:
"""Return True if entity is available."""
return (
self.coordinator.last_update_success
and self.device_id in self.coordinator.data
)
return bool(self.coordinator.data and self.device_id in self.coordinator.data)
@property
def traccar_device(self) -> DeviceModel: