Skip to content

Commit

Permalink
Change unit of measurements for pump duty and S0 energy
Browse files Browse the repository at this point in the history
Change-Id: I8896b24b733cdc0a3ecdb6e896ccc576e381c870
  • Loading branch information
geduxas authored and kamaradclimber committed Dec 9, 2022
1 parent 238ce94 commit 4a592ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/aquarea/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,11 +1237,13 @@ def build_sensors(mqtt_prefix: str) -> list[HeishaMonSensorEntityDescription]:
heishamon_topic_id="TOP95",
key=f"{mqtt_prefix}main/Max_Pump_Duty",
name="Aquarea Max pump duty configured",
native_unit_of_measurement="Count",
),
HeishaMonSensorEntityDescription(
heishamon_topic_id="TOP93",
key=f"{mqtt_prefix}main/Pump_Duty",
name="Aquarea Pump Duty",
native_unit_of_measurement="Count",
),
HeishaMonSensorEntityDescription(
heishamon_topic_id="TOP101",
Expand Down
2 changes: 2 additions & 0 deletions custom_components/aquarea/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def message_received(message):
name=f"HeishaMon s0 {device_id} WattHour",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.MEASUREMENT,
unit_of_measurement="kWh",
native_unit_of_measurement="Wh",
device=DeviceType.HEISHAMON,
)
Expand All @@ -274,6 +275,7 @@ def message_received(message):
key="/".join([base, s0, "WatthourTotal", device_id]),
name=f"HeishaMon s0 {device_id} WattHourTotal",
device_class=SensorDeviceClass.ENERGY,
unit_of_measurement="kWh",
native_unit_of_measurement="Wh",
state_class=SensorStateClass.TOTAL_INCREASING,
device=DeviceType.HEISHAMON,
Expand Down

0 comments on commit 4a592ce

Please sign in to comment.