Skip to content

Commit

Permalink
* Fix wrong SensorDeviceClass in C0257_CURRENT_HEAT_OUTPUT #130
Browse files Browse the repository at this point in the history
* Fix wrong SensorDeviceClass in C0155_HEAT_AMOUNT_FLOW_RATE and C0173_HEAT_SOURCE_FLOW_RATE #134
  • Loading branch information
BenPru committed Sep 20, 2023
1 parent 43cd3f7 commit bf02afe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion custom_components/luxtronik/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def _handle_coordinator_update(self) -> None:

self._enrich_extra_attributes()

if descr.update_interval is not None and (self.next_update is None or self.next_update < utcnow()):
if descr.update_interval is not None and (
self.next_update is None or self.next_update < utcnow()
):
self.next_update = utcnow() + descr.update_interval
super()._handle_coordinator_update()

Expand Down
2 changes: 1 addition & 1 deletion custom_components/luxtronik/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"after_dependencies": [],
"codeowners": ["@BenPru"],
"iot_class": "local_polling",
"version": "2023.9.19",
"version": "2023.9.20",
"homeassistant": "2023.1.0",
"dhcp": [
{ "macaddress": "000E8C*" },
Expand Down
10 changes: 5 additions & 5 deletions custom_components/luxtronik/sensor_entities_predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
device_key=DeviceKey.heating,
icon="mdi:water-sync",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.WATER,
device_class=None, # SensorDeviceClass.WATER, <- There is no predefined device class for flow at the moment.
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=UnitOfVolumeFlowRateExt.LITER_PER_HOUR,
native_precision=1,
Expand All @@ -225,7 +225,7 @@
device_key=DeviceKey.heating,
icon="mdi:water-sync",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.WATER,
device_class=None, # SensorDeviceClass.WATER, <- There is no predefined device class for flow at the moment.
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=UnitOfVolumeFlowRateExt.LITER_PER_HOUR,
native_precision=1,
Expand Down Expand Up @@ -355,10 +355,10 @@
key=SensorKey.CURRENT_HEAT_OUTPUT,
luxtronik_key=LC.C0257_CURRENT_HEAT_OUTPUT,
icon="mdi:lightning-bolt-circle",
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
native_unit_of_measurement=UnitOfPower.WATT,
entity_registry_enabled_default=False,
native_precision=0,
),
Expand Down

0 comments on commit bf02afe

Please sign in to comment.