mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Prevent firing Shelly input events at startup (#43986)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
906e1ce960
commit
5fc7df2746
@ -158,7 +158,11 @@ class ShellyDeviceWrapper(update_coordinator.DataUpdateCoordinator):
|
|||||||
last_event_count = self._last_input_events_count.get(channel)
|
last_event_count = self._last_input_events_count.get(channel)
|
||||||
self._last_input_events_count[channel] = block.inputEventCnt
|
self._last_input_events_count[channel] = block.inputEventCnt
|
||||||
|
|
||||||
if last_event_count == block.inputEventCnt or event_type == "":
|
if (
|
||||||
|
last_event_count is None
|
||||||
|
or last_event_count == block.inputEventCnt
|
||||||
|
or event_type == ""
|
||||||
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if event_type in INPUTS_EVENTS_DICT:
|
if event_type in INPUTS_EVENTS_DICT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user