From c77fcc9d02eb1db40069565a0f9c3e44f3de52a0 Mon Sep 17 00:00:00 2001 From: Jordan H Date: Fri, 5 Jan 2024 11:32:56 +0000 Subject: [PATCH] 2024.1.0b1 --- custom_components/fuel_prices/__init__.py | 1 + custom_components/fuel_prices/device_tracker.py | 1 + custom_components/fuel_prices/manifest.json | 2 +- requirements.txt | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/fuel_prices/__init__.py b/custom_components/fuel_prices/__init__.py index c9a01c4..218db2a 100644 --- a/custom_components/fuel_prices/__init__.py +++ b/custom_components/fuel_prices/__init__.py @@ -88,6 +88,7 @@ async def handle_fuel_location_lookup(call: ServiceCall) -> ServiceResponse: ) locations_built = [] for loc in locations: + await loc.dynamic_build_fuels() locations_built.append(loc.__dict__()) return {"items": locations_built, "sources": entry.data.get("sources", [])} diff --git a/custom_components/fuel_prices/device_tracker.py b/custom_components/fuel_prices/device_tracker.py index 8b15f1d..fc73a36 100644 --- a/custom_components/fuel_prices/device_tracker.py +++ b/custom_components/fuel_prices/device_tracker.py @@ -106,6 +106,7 @@ def state_attributes(self) -> dict[str, StateType]: attr: dict[str, StateType] = { ATTR_SOURCE_TYPE: self.source_type, **self._get_fuels, + **self._fuel_station.__dict__(), } if self.latitude is not None and self.longitude is not None: attr[ATTR_LATITUDE] = self.latitude diff --git a/custom_components/fuel_prices/manifest.json b/custom_components/fuel_prices/manifest.json index 3610090..a5ce6b7 100644 --- a/custom_components/fuel_prices/manifest.json +++ b/custom_components/fuel_prices/manifest.json @@ -10,7 +10,7 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/pantherale0/ha-fuelprices/issues", "requirements": [ - "pyfuelprices==2.1.0", + "pyfuelprices==2.1.1", "geopy", "these-united-states", "reverse-geocode", diff --git a/requirements.txt b/requirements.txt index 7ae5a0d..599b857 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ colorlog==6.7.0 homeassistant==2023.8.0 pip>=21.0,<23.2 ruff==0.0.292 -pyfuelprices==2.1.0 +pyfuelprices==2.1.1 geopy==2.4.0 these-united-states>=1.1 reverse-geocode==1.4.1