From c01549999ae59f37ae2d0a939a77d7467adf06be Mon Sep 17 00:00:00 2001 From: Shay Levy Date: Sun, 10 Oct 2021 22:39:34 +0300 Subject: [PATCH] Fix Shelly button filter empty event (#57427) --- homeassistant/components/shelly/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/shelly/__init__.py b/homeassistant/components/shelly/__init__.py index b0df4d4cb7f..2f1a178721f 100644 --- a/homeassistant/components/shelly/__init__.py +++ b/homeassistant/components/shelly/__init__.py @@ -275,7 +275,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