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
|
@ -3,7 +3,7 @@
|
||||||
"name": "SMA Solar",
|
"name": "SMA Solar",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/sma",
|
"documentation": "https://www.home-assistant.io/integrations/sma",
|
||||||
"requirements": ["pysma==0.6.5"],
|
"requirements": ["pysma==0.6.6"],
|
||||||
"codeowners": ["@kellerza", "@rklomp"],
|
"codeowners": ["@kellerza", "@rklomp"],
|
||||||
"iot_class": "local_polling"
|
"iot_class": "local_polling"
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,10 +166,10 @@ class SMAsensor(CoordinatorEntity, SensorEntity):
|
||||||
self._config_entry_unique_id = config_entry_unique_id
|
self._config_entry_unique_id = config_entry_unique_id
|
||||||
self._device_info = device_info
|
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_state_class = STATE_CLASS_TOTAL_INCREASING
|
||||||
self._attr_device_class = DEVICE_CLASS_ENERGY
|
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_state_class = STATE_CLASS_MEASUREMENT
|
||||||
self._attr_device_class = DEVICE_CLASS_POWER
|
self._attr_device_class = DEVICE_CLASS_POWER
|
||||||
|
|
||||||
|
|
|
@ -1781,7 +1781,7 @@ pysignalclirestapi==0.3.4
|
||||||
pyskyqhub==0.1.3
|
pyskyqhub==0.1.3
|
||||||
|
|
||||||
# homeassistant.components.sma
|
# homeassistant.components.sma
|
||||||
pysma==0.6.5
|
pysma==0.6.6
|
||||||
|
|
||||||
# homeassistant.components.smappee
|
# homeassistant.components.smappee
|
||||||
pysmappee==0.2.27
|
pysmappee==0.2.27
|
||||||
|
|
|
@ -1031,7 +1031,7 @@ pysiaalarm==3.0.0
|
||||||
pysignalclirestapi==0.3.4
|
pysignalclirestapi==0.3.4
|
||||||
|
|
||||||
# homeassistant.components.sma
|
# homeassistant.components.sma
|
||||||
pysma==0.6.5
|
pysma==0.6.6
|
||||||
|
|
||||||
# homeassistant.components.smappee
|
# homeassistant.components.smappee
|
||||||
pysmappee==0.2.27
|
pysmappee==0.2.27
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue