Restore missing device_class to template binary_sensor (#39805)

This commit is contained in:
J. Nick Koston 2020-09-08 10:12:23 -05:00 committed by GitHub
parent 0507ec9d8b
commit 4bbd69955b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

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