Restore missing device_class to template binary_sensor (#39805)
This commit is contained in:
parent
0507ec9d8b
commit
4bbd69955b
2 changed files with 14 additions and 2 deletions
|
@ -194,3 +194,8 @@ class BinarySensorTemplate(TemplateEntity, BinarySensorEntity):
|
|||
def is_on(self):
|
||||
"""Return true if sensor is on."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the sensor class of the binary sensor."""
|
||||
return self._device_class
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue