Skip to content

Commit

Permalink
Merge pull request #176 from hmmbob/fix-conductivity-constant
Browse files Browse the repository at this point in the history
Change deprecated constant CONDUCTIVITY
  • Loading branch information
Olen authored Jun 27, 2024
2 parents eea6bc8 + f90efc4 commit e867f36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Home Assistant Plant",
"render_readme": true,
"homeassistant": "2024.2.0"
"homeassistant": "2024.7.0"
}

0 comments on commit e867f36

Please sign in to comment.