Skip to content

Commit

Permalink
Change deprecated constant
Browse files Browse the repository at this point in the history
  • Loading branch information
hmmbob authored Jun 26, 2024
1 parent eea6bc8 commit 500f2f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions custom_components/plant/plant_meters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
from homeassistant.const import (
ATTR_NAME,
ATTR_UNIT_OF_MEASUREMENT,
CONDUCTIVITY,
LIGHT_LUX,
PERCENTAGE,
STATE_UNAVAILABLE,
STATE_UNKNOWN,
UnitOfTime,
UnitOfConductivity,
UnitOfTemperature,
UnitOfTime,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
Expand Down Expand Up @@ -204,7 +204,7 @@ def __init__(
self._external_sensor = config.data[FLOW_PLANT_INFO].get(
FLOW_SENSOR_CONDUCTIVITY
)
self._attr_native_unit_of_measurement = CONDUCTIVITY
self._attr_native_unit_of_measurement = UnitOfConductivity.MICROSIEMENS

super().__init__(hass, config, plantdevice)

Expand Down
6 changes: 3 additions & 3 deletions custom_components/plant/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
ATTR_ICON,
ATTR_NAME,
ATTR_UNIT_OF_MEASUREMENT,
CONDUCTIVITY,
LIGHT_LUX,
PERCENTAGE,
STATE_UNAVAILABLE,
STATE_UNKNOWN,
UnitOfTime,
UnitOfConductivity,
UnitOfTemperature,
UnitOfTime,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
Expand Down Expand Up @@ -354,7 +354,7 @@ def __init__(
self._external_sensor = config.data[FLOW_PLANT_INFO].get(
FLOW_SENSOR_CONDUCTIVITY
)
self._attr_native_unit_of_measurement = CONDUCTIVITY
self._attr_native_unit_of_measurement = UnitOfConductivity.MICROSIEMENS

super().__init__(hass, config, plantdevice)

Expand Down

0 comments on commit 500f2f2

Please sign in to comment.