Fix Shelly button filter empty event (#57427)

This commit is contained in:
Shay Levy 2021-10-10 22:39:34 +03:00 committed by GitHub
parent 3efbd6a1c9
commit ee80ccf7a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,7 +295,7 @@ class BlockDeviceWrapper(update_coordinator.DataUpdateCoordinator):
if block.type != "device":
continue
if block.wakeupEvent[0] == "button":
if len(block.wakeupEvent) == 1 and block.wakeupEvent[0] == "button":
self._last_input_events_count[1] = -1
break