Bump pysma to 0.6.6 & Fix Unit Checks (#56018)
This commit is contained in:
parent
113288cb1f
commit
f79de2a5bc
4 changed files with 5 additions and 5 deletions
|
@ -166,10 +166,10 @@ class SMAsensor(CoordinatorEntity, SensorEntity):
|
|||
self._config_entry_unique_id = config_entry_unique_id
|
||||
self._device_info = device_info
|
||||
|
||||
if self.unit_of_measurement == ENERGY_KILO_WATT_HOUR:
|
||||
if self.native_unit_of_measurement == ENERGY_KILO_WATT_HOUR:
|
||||
self._attr_state_class = STATE_CLASS_TOTAL_INCREASING
|
||||
self._attr_device_class = DEVICE_CLASS_ENERGY
|
||||
if self.unit_of_measurement == POWER_WATT:
|
||||
if self.native_unit_of_measurement == POWER_WATT:
|
||||
self._attr_state_class = STATE_CLASS_MEASUREMENT
|
||||
self._attr_device_class = DEVICE_CLASS_POWER
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue