Add sensor device classes (#14010)

This commit is contained in:
Paulus Schoutsen 2018-04-20 09:38:27 -04:00 committed by Pascal Vizeli
parent 8459b241a2
commit 2a5fac3b9d
4 changed files with 26 additions and 0 deletions

View file

@ -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."""