Skip to content

Commit

Permalink
Fix geo location attributes of Tankerkoenig sensors (#115914)
Browse files Browse the repository at this point in the history
* geo location attributes needs to be float

* make mypy happy
  • Loading branch information
mib1185 authored and frenck committed Apr 23, 2024
1 parent c9c7c78 commit 036b6fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/tankerkoenig/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(
self._fuel_type = fuel_type
self._attr_translation_key = fuel_type
self._attr_unique_id = f"{station.id}_{fuel_type}"
attrs = {
attrs: dict[str, int | str | float | None] = {
ATTR_BRAND: station.brand,
ATTR_FUEL_TYPE: fuel_type,
ATTR_STATION_NAME: station.name,
Expand All @@ -102,8 +102,8 @@ def __init__(
}

if coordinator.show_on_map:
attrs[ATTR_LATITUDE] = str(station.lat)
attrs[ATTR_LONGITUDE] = str(station.lng)
attrs[ATTR_LATITUDE] = station.lat
attrs[ATTR_LONGITUDE] = station.lng
self._attr_extra_state_attributes = attrs

@property
Expand Down

0 comments on commit 036b6fc

Please sign in to comment.