From 0ca0ed3a315d427071919da0d7c9e5ad76ce9a7d Mon Sep 17 00:00:00 2001 From: Tom Schneider Date: Wed, 24 May 2023 12:43:36 +0200 Subject: [PATCH] Bump pygti and change the request for the new api version (#92283) Bump pygti and change request for the new api version --- homeassistant/components/hvv_departures/binary_sensor.py | 2 +- homeassistant/components/hvv_departures/manifest.json | 2 +- homeassistant/components/hvv_departures/sensor.py | 4 +++- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/hvv_departures/binary_sensor.py b/homeassistant/components/hvv_departures/binary_sensor.py index 36b1b5f927f..a50b2c4d09b 100644 --- a/homeassistant/components/hvv_departures/binary_sensor.py +++ b/homeassistant/components/hvv_departures/binary_sensor.py @@ -88,7 +88,7 @@ async def async_setup_entry( so entities can quickly look up their data. """ - payload = {"station": station} + payload = {"station": {"id": station["id"], "type": station["type"]}} try: async with async_timeout.timeout(10): diff --git a/homeassistant/components/hvv_departures/manifest.json b/homeassistant/components/hvv_departures/manifest.json index c6d3060b4ee..c18777613e8 100644 --- a/homeassistant/components/hvv_departures/manifest.json +++ b/homeassistant/components/hvv_departures/manifest.json @@ -6,5 +6,5 @@ "documentation": "https://www.home-assistant.io/integrations/hvv_departures", "iot_class": "cloud_polling", "loggers": ["pygti"], - "requirements": ["pygti==0.9.3"] + "requirements": ["pygti==0.9.4"] } diff --git a/homeassistant/components/hvv_departures/sensor.py b/homeassistant/components/hvv_departures/sensor.py index dfc69e51710..0669289c1bb 100644 --- a/homeassistant/components/hvv_departures/sensor.py +++ b/homeassistant/components/hvv_departures/sensor.py @@ -84,8 +84,10 @@ class HVVDepartureSensor(SensorEntity): departure_time_tz_berlin = departure_time.astimezone(BERLIN_TIME_ZONE) + station = self.config_entry.data[CONF_STATION] + payload = { - "station": self.config_entry.data[CONF_STATION], + "station": {"id": station["id"], "type": station["type"]}, "time": { "date": departure_time_tz_berlin.strftime("%d.%m.%Y"), "time": departure_time_tz_berlin.strftime("%H:%M"), diff --git a/requirements_all.txt b/requirements_all.txt index 71fca46bb3a..b66ad209649 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1671,7 +1671,7 @@ pygatt[GATTTOOL]==4.0.5 pygtfs==0.1.7 # homeassistant.components.hvv_departures -pygti==0.9.3 +pygti==0.9.4 # homeassistant.components.version pyhaversion==22.8.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 1e315192b80..4bc1e13519a 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1226,7 +1226,7 @@ pyfronius==0.7.1 pyfttt==0.3 # homeassistant.components.hvv_departures -pygti==0.9.3 +pygti==0.9.4 # homeassistant.components.version pyhaversion==22.8.0