Bump pysma to 0.6.6 & Fix Unit Checks (#56018)

This commit is contained in:
popoviciri 2021-09-09 20:19:49 +02:00 committed by GitHub
parent 113288cb1f
commit f79de2a5bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@
"name": "SMA Solar",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/sma",
"requirements": ["pysma==0.6.5"],
"requirements": ["pysma==0.6.6"],
"codeowners": ["@kellerza", "@rklomp"],
"iot_class": "local_polling"
}

View file

@ -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

View file

@ -1781,7 +1781,7 @@ pysignalclirestapi==0.3.4
pyskyqhub==0.1.3
# homeassistant.components.sma
pysma==0.6.5
pysma==0.6.6
# homeassistant.components.smappee
pysmappee==0.2.27

View file

@ -1031,7 +1031,7 @@ pysiaalarm==3.0.0
pysignalclirestapi==0.3.4
# homeassistant.components.sma
pysma==0.6.5
pysma==0.6.6
# homeassistant.components.smappee
pysmappee==0.2.27