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
@@ -13,8 +13,8 @@ from homeassistant.const import (
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
HTTP_FORBIDDEN,
|
||||
HTTP_INTERNAL_SERVER_ERROR,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
from homeassistant.setup import async_setup_component
|
||||
@@ -44,10 +44,10 @@ async def test_default_setup(hass, aioclient_mock):
|
||||
metrics = {
|
||||
"co2": ["1232.0", CONCENTRATION_PARTS_PER_MILLION],
|
||||
"temperature": ["21.1", TEMP_CELSIUS],
|
||||
"humidity": ["49.5", UNIT_PERCENTAGE],
|
||||
"humidity": ["49.5", PERCENTAGE],
|
||||
"pm2_5": ["144.8", CONCENTRATION_MICROGRAMS_PER_CUBIC_METER],
|
||||
"voc": ["340.7", CONCENTRATION_PARTS_PER_BILLION],
|
||||
"index": ["138.9", UNIT_PERCENTAGE],
|
||||
"index": ["138.9", PERCENTAGE],
|
||||
}
|
||||
|
||||
for name, value in metrics.items():
|
||||
|
||||
Reference in new issue
Block a user