mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 13:00:11 +00:00
Add sensor device classes (#14010)
This commit is contained in:
committed by
Pascal Vizeli
parent
8459b241a2
commit
2a5fac3b9d
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user