diff --git a/custom_components/georide/__init__.py b/custom_components/georide/__init__.py index 77cac20..03dee78 100644 --- a/custom_components/georide/__init__.py +++ b/custom_components/georide/__init__.py @@ -25,7 +25,6 @@ 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, @@ -93,16 +92,7 @@ async def async_setup_entry(hass, entry): # We add trackers to the context await context.init_context(hass) - 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")) + await hass.config_entries.async_forward_entry_setups(entry, ["device_tracker", "switch", "sensor", "binary_sensor", "siren"]) return True diff --git a/custom_components/georide/device_tracker.py b/custom_components/georide/device_tracker.py index e945043..5ae3a82 100644 --- a/custom_components/georide/device_tracker.py +++ b/custom_components/georide/device_tracker.py @@ -3,7 +3,7 @@ import logging from typing import Any, Mapping -from homeassistant.components.device_tracker.const import DOMAIN, SOURCE_TYPE_GPS +from homeassistant.components.device_tracker.const import DOMAIN, SourceType.GPS from homeassistant.components.device_tracker.config_entry import TrackerEntity from homeassistant.helpers.update_coordinator import ( diff --git a/hacs.json b/hacs.json index 8c67814..4d3ee3d 100644 --- a/hacs.json +++ b/hacs.json @@ -4,5 +4,5 @@ "render_readme": true, "domains": ["devices_tracker", "sensor"], "country": ["FR"], - "homeassistant": "2023.2.0" + "homeassistant": "2024.11.0" } \ No newline at end of file