Add sensor device classes (#14010)

This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-04-20 15:38:27 +02:00
1 parent 8459b241a2
commit 2a5fac3b9d
4 files changed
+26

No files matched your search

@@ -94,6 +94,11 @@ class LinuxBatterySensor(Entity):
"""Return the name of the sensor."""
return self._name
@property
def device_class(self):
"""Return the device class of the sensor."""
return 'battery'
@property
def state(self):
"""Return the state of the sensor."""