Add sensor device classes (#14010)
This commit is contained in:
parent
8459b241a2
commit
2a5fac3b9d
4 changed files with 26 additions and 0 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue