Add and use percentage constant (#32094)

* Add and use percentage constant

* Fix pylint error and broken test
This commit is contained in:
springstan authored and GitHub committed 2020-02-28 11:46:48 -08:00
1 parent c7f128f286
commit f1a0ca7cd3
155 files changed
+735 -459

No files matched your search

+2 -1
View File
@@ -19,6 +19,7 @@ from homeassistant.const import (
STATE_UNKNOWN,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
UNIT_PERCENTAGE,
)
from homeassistant.helpers import restore_state
from homeassistant.util import dt as dt_util
@@ -35,7 +36,7 @@ from .common import (
async def async_test_humidity(hass, cluster, entity_id):
"""Test humidity sensor."""
await send_attribute_report(hass, cluster, 0, 1000)
assert_state(hass, entity_id, "10.0", "%")
assert_state(hass, entity_id, "10.0", UNIT_PERCENTAGE)
async def async_test_temperature(hass, cluster, entity_id):