-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch ghost events from button and relative_rotary resources #377
Patch ghost events from button and relative_rotary resources #377
Conversation
Verified by comparing the behavior of my production setup to that of a development setup with custom aiohue. |
That wouldn't work. `button_report` is inside the `button` 'feature'
object. Only `last_event` inside the `button` 'feature' object is
deprecated. See
https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_button__id__get.
The same applies to `rotary_report`.
…On Mon, Jul 22, 2024 at 12:29 AM Marcel van der Veldt < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In aiohue/v2/controllers/base.py
<#377 (comment)>
:
> return
if self.item_type == ResourceTypes.RELATIVE_ROTARY and not evt_data.get(
- "relative_rotary"
- ):
+ "relative_rotary", {}).get("rotary_report"):
⬇️ Suggested change
- "relative_rotary", {}).get("rotary_report"):
+ "rotary_report"):
—
Reply to this email directly, view it on GitHub
<#377 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANBTFXVTJBXREPVTG4ECWTZNQY6BAVCNFSM6AAAAABLF35QXKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCOJQGQYDSMRRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yeah you're right - I was not fully awake. As there is no real clean way to do this otherwise, lets just do it this way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This seems to finally fix the ghost events after an update of the hub. |
I think this is not a proper fix as it is now dropping the event from button resources when
button
orbutton.button_report
(orrelative_rotary
orrelative_rotary.rotary_report
for relative_rotary resources) are absent, while there might be other changes in the event that are relevant upstream. Since there was already code to drop the events, I expect the additional condition isn't going to hurt functionality. This should at least make the problem go away.