From f7d801e1f4a117ca983374bd3caf91d9cffe2e32 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Tue, 12 Nov 2024 19:33:43 +0100 Subject: [PATCH 1/3] Update deprecated methods and types --- custom_components/georide/__init__.py | 12 +----------- custom_components/georide/device_tracker.py | 4 ++-- hacs.json | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) 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..a97076f 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 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 SOURCE_TYPE_GPS + return SourceType.GPS @property def location_accuracy(self): 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 From 43b578cd98033a5a678190dce6fedfebda28fafa Mon Sep 17 00:00:00 2001 From: Matthieu DUVAL Date: Sun, 29 Oct 2023 13:26:04 +0100 Subject: [PATCH 2/3] Merge pull request #9 from Sigri44/master Add manual installation --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d5ed2c1..75ebd07 100644 --- a/README.md +++ b/README.md @@ -102,12 +102,21 @@ mode: single ## Installation ### Option 1 -- Just folow the integration config steps. +- Just follow the integration config steps. ### Option 2 -- Add the folowing line in your configuration.yml +- Add the following line in your configuration.yml ```yaml georide: email: @exmple.com password: -``` \ No newline at end of file +``` + +### Option 3 (manual) +- Download .zip git repo +- Go to /config (with File Editor or SSH) +- Unzip GeorideHA.zip +- Restart Home Assistant +- Go to "Integrations" +- If GeoRide not display, choose "add integration" +- Configure GeoRide add-on From eea4e1bb6bc476a3ea93cb9f7ad1d9e402db2f7c Mon Sep 17 00:00:00 2001 From: Matthieu Date: Tue, 12 Nov 2024 20:11:16 +0100 Subject: [PATCH 3/3] update to vesion 1.1.1 --- custom_components/georide/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/georide/manifest.json b/custom_components/georide/manifest.json index 431d050..55ee38e 100644 --- a/custom_components/georide/manifest.json +++ b/custom_components/georide/manifest.json @@ -11,5 +11,5 @@ ], "dependencies": [], "codeowners": ["ptimatth"], - "version": "1.1.0" + "version": "1.1.1" } \ No newline at end of file