Compare commits
15 Commits
f7d801e1f4
...
1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d08d8f9a7 | |||
| f30176cb65 | |||
| e6817e174b | |||
| 22047ff6be | |||
| 7d809c2105 | |||
| e59c8cb195 | |||
| 5af8e7dc5d | |||
| 9053f95bc1 | |||
| fc383ff373 | |||
| 57abb51b13 | |||
| 24180c9345 | |||
| a83bae6d3e | |||
| b84a4cfd7f | |||
| 02e1656aab | |||
| 9b651f933e |
@@ -25,6 +25,7 @@ import homeassistant.helpers.config_validation as cv
|
||||
import homeassistant.helpers.event as ha_event
|
||||
|
||||
from homeassistant.setup import async_when_setup
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
from homeassistant.helpers.update_coordinator import (
|
||||
CoordinatorEntity,
|
||||
DataUpdateCoordinator,
|
||||
@@ -92,7 +93,16 @@ async def async_setup_entry(hass, entry):
|
||||
# We add trackers to the context
|
||||
await context.init_context(hass)
|
||||
|
||||
await hass.config_entries.async_forward_entry_setups(entry, ["device_tracker", "switch", "sensor", "binary_sensor", "siren"])
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_setup(entry, "device_tracker"))
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_setup(entry, "switch"))
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_setup(entry, "sensor"))
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_setup(entry, "binary_sensor"))
|
||||
hass.async_create_task(
|
||||
hass.config_entries.async_forward_entry_setup(entry, "siren"))
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import logging
|
||||
from typing import Any, Mapping
|
||||
|
||||
from homeassistant.components.device_tracker.const import DOMAIN, SourceType
|
||||
from homeassistant.components.device_tracker.const import DOMAIN, SOURCE_TYPE_GPS
|
||||
from homeassistant.components.device_tracker.config_entry import TrackerEntity
|
||||
|
||||
from homeassistant.helpers.update_coordinator import (
|
||||
@@ -78,7 +78,7 @@ class GeoRideTrackerEntity(CoordinatorEntity, TrackerEntity):
|
||||
@property
|
||||
def source_type(self):
|
||||
"""Return the source type, eg gps or router, of the device."""
|
||||
return SourceType.GPS
|
||||
return SOURCE_TYPE_GPS
|
||||
|
||||
@property
|
||||
def location_accuracy(self):
|
||||
|
||||
Reference in New Issue
Block a user