Drop UNIT_ prefix for percentage constant (#39383)
This commit is contained in:
parent
cdc93d7110
commit
d2b1918e9c
183 changed files with 639 additions and 661 deletions
|
@ -11,7 +11,7 @@ from homeassistant.components.canary.sensor import (
|
|||
STATE_AIR_QUALITY_VERY_ABNORMAL,
|
||||
CanarySensor,
|
||||
)
|
||||
from homeassistant.const import TEMP_CELSIUS, UNIT_PERCENTAGE
|
||||
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS
|
||||
|
||||
from tests.async_mock import Mock
|
||||
from tests.common import get_test_home_assistant
|
||||
|
@ -95,7 +95,7 @@ class TestCanarySensorSetup(unittest.TestCase):
|
|||
sensor.update()
|
||||
|
||||
assert sensor.name == "Home Family Room Humidity"
|
||||
assert sensor.unit_of_measurement == UNIT_PERCENTAGE
|
||||
assert sensor.unit_of_measurement == PERCENTAGE
|
||||
assert sensor.state == 50.46
|
||||
assert sensor.icon == "mdi:water-percent"
|
||||
|
||||
|
@ -182,7 +182,7 @@ class TestCanarySensorSetup(unittest.TestCase):
|
|||
sensor.update()
|
||||
|
||||
assert sensor.name == "Home Family Room Battery"
|
||||
assert sensor.unit_of_measurement == UNIT_PERCENTAGE
|
||||
assert sensor.unit_of_measurement == PERCENTAGE
|
||||
assert sensor.state == 70.46
|
||||
assert sensor.icon == "mdi:battery-70"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue