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:
cdce8p authored and Paulus Schoutsen committed 2018-05-05 09:37:40 -04:00
1 parent ec3ce4c80d
commit 95d27bd1fa
19 files changed
+92 -79

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
import homeassistant.helpers.config_validation as cv
from homeassistant.const import CONF_NAME
from homeassistant.const import CONF_NAME, DEVICE_CLASS_ILLUMINANCE
from homeassistant.helpers.entity import Entity
REQUIREMENTS = ['i2csense==0.0.4',
@@ -130,7 +130,7 @@ class BH1750Sensor(Entity):
@property
def device_class(self) -> str:
"""Return the class of this device, from component DEVICE_CLASSES."""
return 'light'
return DEVICE_CLASS_ILLUMINANCE
@asyncio.coroutine
def async_update(self):