Drop UNIT_ prefix for percentage constant (#39383)
This commit is contained in:
1 parent
cdc93d7110
commit
d2b1918e9c
183 files changed
+639
-661
No files matched your search
@@ -7,12 +7,12 @@ from homeassistant import config as hass_config
|
||||
from homeassistant.components.min_max import DOMAIN
|
||||
from homeassistant.const import (
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
PERCENTAGE,
|
||||
SERVICE_RELOAD,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_UNKNOWN,
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
from homeassistant.setup import async_setup_component, setup_component
|
||||
|
||||
@@ -301,7 +301,7 @@ class TestMinMaxSensor(unittest.TestCase):
|
||||
assert state.attributes.get("unit_of_measurement") == "ERR"
|
||||
|
||||
self.hass.states.set(
|
||||
entity_ids[2], self.values[2], {ATTR_UNIT_OF_MEASUREMENT: UNIT_PERCENTAGE}
|
||||
entity_ids[2], self.values[2], {ATTR_UNIT_OF_MEASUREMENT: PERCENTAGE}
|
||||
)
|
||||
self.hass.block_till_done()
|
||||
|
||||
|
||||
Reference in new issue
Block a user