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

@@ -52,6 +52,13 @@ class EcobeeSensor(Entity):
"""Return the name of the Ecobee sensor."""
return self._name
@property
def device_class(self):
"""Return the device class of the sensor."""
if self.type in ('temperature', 'humidity'):
return self.type
return None
@property
def state(self):
"""Return the state of the sensor."""