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
@@ -4,7 +4,7 @@ import logging
|
||||
|
||||
from amcrest import AmcrestError
|
||||
|
||||
from homeassistant.const import CONF_NAME, CONF_SENSORS
|
||||
from homeassistant.const import CONF_NAME, CONF_SENSORS, UNIT_PERCENTAGE
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
@@ -20,7 +20,7 @@ SENSOR_SDCARD = "sdcard"
|
||||
# Sensor types are defined like: Name, units, icon
|
||||
SENSORS = {
|
||||
SENSOR_PTZ_PRESET: ["PTZ Preset", None, "mdi:camera-iris"],
|
||||
SENSOR_SDCARD: ["SD Used", "%", "mdi:sd"],
|
||||
SENSOR_SDCARD: ["SD Used", UNIT_PERCENTAGE, "mdi:sd"],
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user