Use AREA_SQUARE_METERS constant in all integrations (#40107)

This commit is contained in:
springstan authored and GitHub committed 2020-09-15 15:00:26 -06:00
1 parent a71a4d642b
commit 90f5b178ef
5 files changed
+26 -6

No files matched your search

+3 -2
View File
@@ -5,6 +5,7 @@ import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
AREA_SQUARE_METERS,
CONF_MONITORED_CONDITIONS,
PERCENTAGE,
TEMP_CELSIUS,
@@ -32,7 +33,7 @@ SENSOR_UNITS_IMPERIAL = {
"Temperature": TEMP_FAHRENHEIT,
"Humidity": PERCENTAGE,
"Pressure": "inHg",
"Luminance": "cd/m²",
"Luminance": f"cd/{AREA_SQUARE_METERS}",
"Voltage": "mV",
}
@@ -41,7 +42,7 @@ SENSOR_UNITS_METRIC = {
"Temperature": TEMP_CELSIUS,
"Humidity": PERCENTAGE,
"Pressure": "mbar",
"Luminance": "cd/m²",
"Luminance": f"cd/{AREA_SQUARE_METERS}",
"Voltage": "mV",
}