From ee80ccf7a64122506ef91bd630e73d8af8a2c1f8 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 87896f4380b..cb48f34cba6 100644 --- a/homeassistant/components/shelly/__init__.py +++ b/homeassistant/components/shelly/__init__.py @@ -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