Skip to content

Commit

Permalink
Merge pull request #67 from petterkatt/patch-1
Browse files Browse the repository at this point in the history
Fix issue #66
  • Loading branch information
mrk-its authored Dec 1, 2022
2 parents 7c171dd + 1b681a8 commit 3a05c32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/blitzortung/geo_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from homeassistant.components.geo_location import GeolocationEvent
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_UNIT_SYSTEM_IMPERIAL,
LENGTH_KILOMETERS,
LENGTH_MILES,
)
Expand All @@ -17,6 +16,7 @@
async_dispatcher_send,
)
from homeassistant.util.dt import utc_from_timestamp
from homeassistant.util.unit_system import IMPERIAL_SYSTEM

from .const import ATTR_EXTERNAL_ID, ATTR_PUBLICATION_DATE, ATTRIBUTION, DOMAIN

Expand Down Expand Up @@ -97,7 +97,7 @@ def __init__(
self._strikes = Strikes(max_tracked_lightnings)
self._window_seconds = window_seconds

if hass.config.units.name == CONF_UNIT_SYSTEM_IMPERIAL:
if hass.config.units == IMPERIAL_SYSTEM:
self._unit = LENGTH_MILES
else:
self._unit = LENGTH_KILOMETERS
Expand Down

0 comments on commit 3a05c32

Please sign in to comment.