mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Use const instead of literal string in HVV integration (#118479)
Use const instead of literal string
This commit is contained in:
parent
c387698c6f
commit
e3f6d4cfbf
@ -9,7 +9,7 @@ from pygti.exceptions import InvalidAuth
|
|||||||
|
|
||||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||||
from homeassistant.config_entries import ConfigEntry
|
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.core import HomeAssistant
|
||||||
from homeassistant.helpers import aiohttp_client
|
from homeassistant.helpers import aiohttp_client
|
||||||
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
||||||
@ -92,7 +92,7 @@ class HVVDepartureSensor(SensorEntity):
|
|||||||
async def async_update(self, **kwargs: Any) -> None:
|
async def async_update(self, **kwargs: Any) -> None:
|
||||||
"""Update the sensor."""
|
"""Update the sensor."""
|
||||||
departure_time = utcnow() + timedelta(
|
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)
|
departure_time_tz_berlin = departure_time.astimezone(BERLIN_TIME_ZONE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user