1 """Support for Traccar server device tracking."""
3 from __future__
import annotations
12 from .const
import ATTR_CATEGORY, ATTR_TRACCAR_ID, ATTR_TRACKER, DOMAIN
13 from .coordinator
import TraccarServerCoordinator
14 from .entity
import TraccarServerEntity
20 async_add_entities: AddEntitiesCallback,
22 """Set up device tracker entities."""
23 coordinator: TraccarServerCoordinator = hass.data[DOMAIN][entry.entry_id]
26 for entry
in coordinator.data.values()
31 """Represent a tracked device."""
33 _attr_has_entity_name =
True
38 """Return device specific attributes."""
48 """Return latitude value of the device."""
53 """Return longitude value of the device."""
58 """Return the gps accuracy of the device."""
int location_accuracy(self)
dict[str, Any] extra_state_attributes(self)
DeviceModel traccar_device(self)
dict[str, Any] traccar_attributes(self)
PositionModel traccar_position(self)
None async_setup_entry(HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)