Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions custom_components/aquanta/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
SensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import TEMP_CELSIUS, PERCENTAGE
from homeassistant.const import UnitOfTemperature, PERCENTAGE
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

Expand All @@ -23,7 +23,7 @@
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:water-thermometer",
),
"native_value": lambda entity: entity.coordinator.data["devices"][
Expand All @@ -38,7 +38,7 @@
name="Set point",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:thermometer-water",
),
"native_value": lambda entity: entity.coordinator.data["devices"][
Expand Down
6 changes: 2 additions & 4 deletions custom_components/aquanta/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
WaterHeaterEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
TEMP_CELSIUS,
)
from homeassistant.const import UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

Expand Down Expand Up @@ -41,7 +39,7 @@ class AquantaWaterHeater(AquantaEntity, WaterHeaterEntity):

_attr_has_entity_name = True
_attr_supported_features = WaterHeaterEntityFeature.AWAY_MODE
_attr_temperature_unit = TEMP_CELSIUS
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_operation_list = [STATE_ECO, STATE_PERFORMANCE, STATE_OFF]
_attr_name = "Water heater"

Expand Down