Skip to content

Commit

Permalink
Patch ghost events from button and relative_rotary resources (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
idekker authored Jul 26, 2024
1 parent c49d2dc commit f1c034b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aiohue/v2/controllers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,13 @@ async def _handle_event(
# in fact this is a feature request to Signify to handle these stateless
# device events in a different way:
# https://developers.meethue.com/forum/t/differentiate-stateless-events/6627
if self.item_type == ResourceTypes.BUTTON and not evt_data.get("button"):
if self.item_type == ResourceTypes.BUTTON and not evt_data.get(
"button", {}
).get("button_report"):
return
if self.item_type == ResourceTypes.RELATIVE_ROTARY and not evt_data.get(
"relative_rotary"
):
"relative_rotary", {}
).get("rotary_report"):
return
else:
# ignore all other events
Expand Down

0 comments on commit f1c034b

Please sign in to comment.