Skip to content

Commit

Permalink
Remove deprecated is_metric in favor of is METRIC_SYSTEM
Browse files Browse the repository at this point in the history
  • Loading branch information
jshufro committed Dec 30, 2022
1 parent 1fffd54 commit e7a64df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion noaa_tides/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.util.unit_system import METRIC_SYSTEM

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -60,7 +61,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=

if CONF_UNIT_SYSTEM in config:
unit_system = config[CONF_UNIT_SYSTEM]
elif hass.config.units.is_metric:
elif hass.config.units is METRIC_SYSTEM:
unit_system = UNIT_SYSTEMS[1]
else:
unit_system = UNIT_SYSTEMS[0]
Expand Down

0 comments on commit e7a64df

Please sign in to comment.