Add and use percentage constant (#32094)

* Add and use percentage constant

* Fix pylint error and broken test
This commit is contained in:
springstan 2020-02-28 20:46:48 +01:00 committed by GitHub
parent c7f128f286
commit f1a0ca7cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 735 additions and 459 deletions

View file

@ -8,6 +8,7 @@ from homeassistant.const import (
DEVICE_CLASS_TEMPERATURE,
DEVICE_CLASS_TIMESTAMP,
TEMP_CELSIUS,
UNIT_PERCENTAGE,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -39,7 +40,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
state_proxy=state_proxy,
metric_key="A_CYC_FAN_SPEED",
device_class=None,
unit_of_measurement="%",
unit_of_measurement=UNIT_PERCENTAGE,
icon="mdi:fan",
),
ValloxSensor(
@ -79,7 +80,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
state_proxy=state_proxy,
metric_key="A_CYC_RH_VALUE",
device_class=DEVICE_CLASS_HUMIDITY,
unit_of_measurement="%",
unit_of_measurement=UNIT_PERCENTAGE,
icon=None,
),
ValloxFilterRemainingSensor(