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
|
@ -6,9 +6,9 @@ import voluptuous as vol
|
|||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
@ -30,7 +30,7 @@ SENSOR_TYPES = [
|
|||
# Sensor units - these do not currently align with the API documentation
|
||||
SENSOR_UNITS_IMPERIAL = {
|
||||
"Temperature": TEMP_FAHRENHEIT,
|
||||
"Humidity": UNIT_PERCENTAGE,
|
||||
"Humidity": PERCENTAGE,
|
||||
"Pressure": "inHg",
|
||||
"Luminance": "cd/m²",
|
||||
"Voltage": "mV",
|
||||
|
@ -39,7 +39,7 @@ SENSOR_UNITS_IMPERIAL = {
|
|||
# Metric units
|
||||
SENSOR_UNITS_METRIC = {
|
||||
"Temperature": TEMP_CELSIUS,
|
||||
"Humidity": UNIT_PERCENTAGE,
|
||||
"Humidity": PERCENTAGE,
|
||||
"Pressure": "mbar",
|
||||
"Luminance": "cd/m²",
|
||||
"Voltage": "mV",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue