Add and use percentage constant (#32094)
* Add and use percentage constant * Fix pylint error and broken test
This commit is contained in:
parent
c7f128f286
commit
f1a0ca7cd3
155 changed files with 735 additions and 459 deletions
|
@ -7,6 +7,7 @@ from homeassistant.const import (
|
|||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.util.dt import parse_datetime
|
||||
|
@ -21,7 +22,7 @@ DEVICE_CLASS_SOUND = "sound_level"
|
|||
SENSOR_TYPES = {
|
||||
DEVICE_CLASS_TEMPERATURE: (None, 1, TEMP_CELSIUS),
|
||||
DEVICE_CLASS_PRESSURE: (None, 0, "hPa"),
|
||||
DEVICE_CLASS_HUMIDITY: (None, 1, "%"),
|
||||
DEVICE_CLASS_HUMIDITY: (None, 1, UNIT_PERCENTAGE),
|
||||
DEVICE_CLASS_SOUND: ("mdi:ear-hearing", 1, "dBa"),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue