Sensor device classes (#14282)
* Added light device class, moved device classes to const * Removed unnecessary icons * Replace 'lux' with 'lx' * Fix comment * Changed device_class name
This commit is contained in:
1 parent
ec3ce4c80d
commit
95d27bd1fa
19 files changed
+92
-79
No files matched your search
@@ -9,8 +9,9 @@ import logging
|
||||
|
||||
from homeassistant.components.nest import DATA_NEST
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT,
|
||||
CONF_MONITORED_CONDITIONS)
|
||||
from homeassistant.const import (
|
||||
TEMP_CELSIUS, TEMP_FAHRENHEIT, CONF_MONITORED_CONDITIONS,
|
||||
DEVICE_CLASS_TEMPERATURE)
|
||||
|
||||
DEPENDENCIES = ['nest']
|
||||
SENSOR_TYPES = ['humidity',
|
||||
@@ -143,7 +144,7 @@ class NestTempSensor(NestSensor):
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the device class of the sensor."""
|
||||
return 'temperature'
|
||||
return DEVICE_CLASS_TEMPERATURE
|
||||
|
||||
def update(self):
|
||||
"""Retrieve latest state."""
|
||||
|
||||
Reference in new issue
Block a user