-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
KeyError on integration setup when custom area is set in Nest app #73
Comments
The way to go would be to gracefully fall back on an unset area if automatic assignment fails like this. |
That would work or do it like the other Nest integration or a combination. I just re-added my doorbell and thermostat as well and it asked what areas to put them in during the setup. |
Thanks for reporting! I will investigate why this is not working.
This should not be necessary. We only 'suggest' the areas, thus it will create new areas in Home Assistant if they are not present yet. This is default behavior of Home Assistant. |
When you say you only suggest areas, how is the suggestion made? I didn't get any suggestions. The integration for the other Nest products asked me where my doorbell and thermostat was located for example. I didn't get that prompt from the Protect integration though. I picked the integration from the list and authenticated. It appeared in my integrations with no devices/entities associated with it and the mentioned errors in the logs. I'm not sure how the keys are generated and compared so it's hard for me to help you troubleshoot. How does that work? |
They are assigned by default; above a screenshot of my development environment where I didn't create any areas myself yet. It looks like a mismatch between the where_id of your device and the available ids in the 'all Google areas query'. How did you create your own custom areas in the Nest app? I will have a look if I can reproduce this, since I found the issue, but I am not sure why you have an area id that is not present in the area list. |
@blue-hound any update? Otherwise I will close this issue, since I cannot reproduce. |
Sorry, I got busy. I will investigate some more on the next few days, I seemed to have missed your update back in April. |
The problem
I didn't run into any errors during the setup, but when it was complete, my Nest Protects weren't found. The logs showed the following for all the entities the integration tried to set up. The line numbers vary of course but it happens for binary_sensor, sensor, select, and switch.
This seemed to be corrected when I made the areas in the Nest app match the areas in Home Assistant. For example, I had my basement Nest Protect location set to 'Downstairs' but that location does not exist in Home Assistant, instead it is called 'Rec. Room'. Once I changed the name from 'Downstairs' to 'Dining Room' the Nest Protects were discovered immediately. I also removed the additional descriptions that appear in brackets, so I am not sure if that contributed as well.
Perhaps a solution would be to not to try and add the area automatically and let the user decide where they go. Seems the simplest way to go :-)
After the initial setup, I was able to change the location of Nest Protect back to 'Downstairs' and there were no issues. I manually changed the Nest Protect area in Home Assistant from 'Dining Room' to 'Rec Room'. All seems to be functioning well.
What version of this integration (ha-nest-protect) has the issue?
v0.3.3 & v0.3.4
What version of Home Assistant Core has the issue?
core-2022.4.7
Device / Model
Topaz-2.9, Topaz-2.33, Topaz-2.33 (Nest Protect 2nd Gens)
Diagnostics information
Working - config_entry-nest_protect-e07d1c46cc43a0e1eb6bcc5b2d3b406a.json.txt
Not Working - config_entry-nest_protect-7f217c93e3fce8d43ce4078eabe506eb.json.txt
Home Assistant log
Logs
Additional information
The logging above is with debug on but nothing else useful was logged. I've included diagnostic data from before and after things started to work.
The text was updated successfully, but these errors were encountered: