Fix is_on attr not being used in binary sensor (#50968)

This commit is contained in:
Franck Nijhof 2021-05-22 19:45:05 +02:00 committed by GitHub
parent a03ee1e528
commit 4948bec8d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,7 +154,7 @@ class BinarySensorEntity(Entity):
@property
def is_on(self) -> bool | None:
"""Return true if the binary sensor is on."""
return None
return self._attr_is_on
@property
def state(self) -> StateType: