Updated changes for aioshelly 1.0.0 (#56083)

This commit is contained in:
Shay Levy 2021-09-11 00:48:55 +03:00 committed by GitHub
parent ac1251c52b
commit 8c3c2ad8e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 108 additions and 86 deletions

View file

@ -48,7 +48,7 @@ SENSORS: Final = {
("sensor", "dwIsOpened"): BlockAttributeDescription(
name="Door",
device_class=DEVICE_CLASS_OPENING,
available=lambda block: cast(bool, block.dwIsOpened != -1),
available=lambda block: cast(int, block.dwIsOpened) != -1,
),
("sensor", "flood"): BlockAttributeDescription(
name="Flood", device_class=DEVICE_CLASS_MOISTURE