Add and use percentage constant (#32094)
* Add and use percentage constant * Fix pylint error and broken test
This commit is contained in:
1 parent
c7f128f286
commit
f1a0ca7cd3
155 files changed
+735
-459
No files matched your search
@@ -21,6 +21,7 @@ from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
SPEED_KILOMETERS_PER_HOUR,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@@ -68,7 +69,7 @@ SENSOR_TYPES = {
|
||||
"press_msl": ["Pressure msl", "msl"],
|
||||
"press_tend": ["Pressure Tend", None],
|
||||
"rain_trace": ["Rain Today", "mm"],
|
||||
"rel_hum": ["Relative Humidity", "%"],
|
||||
"rel_hum": ["Relative Humidity", UNIT_PERCENTAGE],
|
||||
"sea_state": ["Sea State", None],
|
||||
"swell_dir_worded": ["Swell Direction", None],
|
||||
"swell_height": ["Swell Height", "m"],
|
||||
|
||||
Reference in new issue
Block a user