Add and use percentage constant (#32094)
* Add and use percentage constant * Fix pylint error and broken test
This commit is contained in:
1 parent
c7f128f286
commit
f1a0ca7cd3
155 files changed
+735
-459
No files matched your search
@@ -6,6 +6,7 @@ from homeassistant.const import (
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
@@ -45,14 +46,24 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
ReadCommand.extractTemperature,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
],
|
||||
["Danfoss Air Remaining Filter", "%", ReadCommand.filterPercent, None],
|
||||
["Danfoss Air Humidity", "%", ReadCommand.humidity, DEVICE_CLASS_HUMIDITY],
|
||||
["Danfoss Air Fan Step", "%", ReadCommand.fan_step, None],
|
||||
[
|
||||
"Danfoss Air Remaining Filter",
|
||||
UNIT_PERCENTAGE,
|
||||
ReadCommand.filterPercent,
|
||||
None,
|
||||
],
|
||||
[
|
||||
"Danfoss Air Humidity",
|
||||
UNIT_PERCENTAGE,
|
||||
ReadCommand.humidity,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
],
|
||||
["Danfoss Air Fan Step", UNIT_PERCENTAGE, ReadCommand.fan_step, None],
|
||||
["Danfoss Air Exhaust Fan Speed", "RPM", ReadCommand.exhaust_fan_speed, None],
|
||||
["Danfoss Air Supply Fan Speed", "RPM", ReadCommand.supply_fan_speed, None],
|
||||
[
|
||||
"Danfoss Air Dial Battery",
|
||||
"%",
|
||||
UNIT_PERCENTAGE,
|
||||
ReadCommand.battery_percent,
|
||||
DEVICE_CLASS_BATTERY,
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user