Add support for homekit garage obstruction sensors (#42243)

This commit is contained in:
J. Nick Koston 2020-10-23 12:18:02 -05:00 committed by GitHub
parent 88231aa541
commit 4bf9ce6fca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 139 additions and 7 deletions

View file

@ -116,9 +116,7 @@ class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
obstruction_detected = self.service.value(
CharacteristicsTypes.OBSTRUCTION_DETECTED
)
if not obstruction_detected:
return {}
return {"obstruction-detected": obstruction_detected}
return {"obstruction-detected": obstruction_detected is True}
class HomeKitWindowCover(HomeKitEntity, CoverEntity):