-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Errors in _async_subscribe_for_data
#347
Comments
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
Traceback (most recent call last): |
Thanks all! Known issue, no need to keep reporting +1 (everyone on the latest version faces this 😉). At the moment I don't have time to work on this unfortunately, but hope to make some time in the coming weeks. In the mean-time, contributions are appreciated. |
yea, I'm having a hard time googling around to help parse that line of code and how it might be fixed, but based on the previous version and the comment above, I suspect the non-one-liner way to write what the intent is there would be:
does that look right? |
That looks right to my eyes at first blush (changing |
Code above isn't quite right either:
|
Here's what seems to be working for me... I'm not sure why it works, but no errors and so far somewhat timely occupancy detection (which is what I'm trying to get):
I'm not 100% convinced this is the right solution (or substantially any different than the original code!). |
Submitted a PR for this #355 (on the |
EDIT: Err, never mind. I somehow ended up with 2 integration entries - 1 working happily, and 1 with outdated credentials spamming the logs. Errors went away after deleting the old entry and rebooting. With the patch above, I now get a different error:
Refreshing my The funny thing is that the integration still works ok - Presence detection happens within a few seconds (with a 10-minute timeout before going back to clear, but I think that's expected?) Maybe that _async_subscribe_for_data business isn't needed at all? |
@iMicknl in #358 you closed as duplicate saying,
However, the Perhaps #355? I have applied the change in 4a12184 manually for now, and can confirm that, so far, the log spam has disappeared. |
@iMicknl Ideas on how to fix this the right way? I didn't notice the communication side-effect with my kludge. |
The problem
Getting these errors in the logfile..
AttributeError: 'list' object has no attribute 'object_key'
2024-07-24 12:16:33.179 ERROR (MainThread) [custom_components.nest_protect] Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes.
Traceback (most recent call last):
File "/config/custom_components/nest_protect/init.py", line 208, in _async_subscribe_for_data
dict(b, **buckets.get(b.object_key, {})) for b in [data.updated_buckets]
What version of this integration (ha-nest-protect) has the issue?
v0.4.0b5
What version of Home Assistant Core has the issue?
2024.7.3
Device / Model
Topaz-2.7
Diagnostics information
No response
Home Assistant log
Logs
Additional information
No response
The text was updated successfully, but these errors were encountered: