Skip to content

Commit

Permalink
Merge pull request #13 from jasperslits/autotemp_power
Browse files Browse the repository at this point in the history
Fix unit types for autotemp rooms
  • Loading branch information
jasperslits authored Oct 27, 2024
2 parents 0563853 + 38e2554 commit 4ca1462
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions custom_components/ithodaalderop/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from homeassistant.const import (
UnitOfTemperature,
UnitOfTime,
UnitOfPower,
UnitOfPressure,
REVOLUTIONS_PER_MINUTE,
PERCENTAGE
Expand Down Expand Up @@ -146,8 +147,8 @@ class IthoBinarySensorEntityDescription(BinarySensorEntityDescription):
json_field="Room X power % (%)",
key=MQTT_STATETOPIC["autotemp"],
translation_key="Room X power % (%)",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.POWER_FACTOR,
native_unit_of_measurement="%",
state_class=SensorStateClass.MEASUREMENT,
),
IthoSensorEntityDescription(
Expand All @@ -162,8 +163,8 @@ class IthoBinarySensorEntityDescription(BinarySensorEntityDescription):
json_field="Room X power kW (kW)",
key=MQTT_STATETOPIC["autotemp"],
translation_key="Room X power kW",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.KILO_WATT,
state_class=SensorStateClass.MEASUREMENT,
),
IthoSensorEntityDescription(
Expand Down

0 comments on commit 4ca1462

Please sign in to comment.