From e3f6d4cfbf3c8d3121788f3cf8a0d2c2e9407937 Mon Sep 17 00:00:00 2001 From: Tsvi Mostovicz Date: Thu, 30 May 2024 14:59:38 +0300 Subject: [PATCH] Use const instead of literal string in HVV integration (#118479) Use const instead of literal string --- homeassistant/components/hvv_departures/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/hvv_departures/sensor.py b/homeassistant/components/hvv_departures/sensor.py index 89260b921ea..6ad61295d04 100644 --- a/homeassistant/components/hvv_departures/sensor.py +++ b/homeassistant/components/hvv_departures/sensor.py @@ -9,7 +9,7 @@ from pygti.exceptions import InvalidAuth from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.config_entries import ConfigEntry -from homeassistant.const import ATTR_ID +from homeassistant.const import ATTR_ID, CONF_OFFSET from homeassistant.core import HomeAssistant from homeassistant.helpers import aiohttp_client from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo @@ -92,7 +92,7 @@ class HVVDepartureSensor(SensorEntity): async def async_update(self, **kwargs: Any) -> None: """Update the sensor.""" departure_time = utcnow() + timedelta( - minutes=self.config_entry.options.get("offset", 0) + minutes=self.config_entry.options.get(CONF_OFFSET, 0) ) departure_time_tz_berlin = departure_time.astimezone(BERLIN_TIME_ZONE)