Add flipr battery level sensor (#81389)

* Addition of battery level sensor. Correction of pylint errors

* Review improvement for typing

* Review improvement for typing

* Correction following review
This commit is contained in:
cnico 2022-11-16 09:42:31 +01:00 committed by GitHub
parent 532c6b74d4
commit c7dfd6b15a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 12 deletions

View file

@ -45,7 +45,7 @@ class FliprBinarySensor(FliprEntity, BinarySensorEntity):
"""Representation of Flipr binary sensors."""
@property
def is_on(self):
def is_on(self) -> bool:
"""Return true if the binary sensor is on in case of a Problem is detected."""
return (
self.coordinator.data[self.entity_description.key] == "TooLow"