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
|
@ -12,6 +12,7 @@ from homeassistant.const import (
|
|||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
@ -24,8 +25,8 @@ DEFAULT_NAME = "BeeWi SmartClim"
|
|||
# Sensor config
|
||||
SENSOR_TYPES = [
|
||||
[DEVICE_CLASS_TEMPERATURE, "Temperature", TEMP_CELSIUS],
|
||||
[DEVICE_CLASS_HUMIDITY, "Humidity", "%"],
|
||||
[DEVICE_CLASS_BATTERY, "Battery", "%"],
|
||||
[DEVICE_CLASS_HUMIDITY, "Humidity", UNIT_PERCENTAGE],
|
||||
[DEVICE_CLASS_BATTERY, "Battery", UNIT_PERCENTAGE],
|
||||
]
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue