domain:
{%- set unique_domains = states | map(attribute='domain') |list | unique | list -%}
{%- for domain in unique_domains -%}
- {{domain + "\n"}}
{%- endfor -%}
entities:
{%- for state in states -%}
- {{state.entity_id + "\n"}}
{%- endfor -%}
I followed James T’s steps above and it ll went well (Thanks for that). But I only see 2 entities (Temp and Humidity defined as sensors). I was expecting the thermostat and my doorbell to also be defined. Do I need to define these myself in the configuration.yaml?
thanks elliotledger - that resolved “some” of the issue!
So what happens now is that when I add the integration it seems to loop through the authorization process twice and then I get an error message:
“500 Internal Server Error
Server got itself in trouble”
Looking at log files I see this:
Logger: aiohttp.server
Source: helpers/config_entry_oauth2_flow.py:178
First occurred: November 2, 2020, 7:27:01 PM (11 occurrences)
Last logged: 5:53:18 PM
Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py”, line 418, in start
resp = await task
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py”, line 458, in _handle
resp = await handler(request)
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py”, line 119, in impl
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 18, in request_context_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 72, in ban_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 127, in auth_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 129, in handle
result = await result
File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 406, in get
await hass.config_entries.flow.async_configure(
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 153, in async_configure
result = await self._async_handle_step(flow, cur_step[“step_id”], user_input)
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 201, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 270, in async_step_creation
token = await self.flow_impl.async_resolve_external_data(self.external_data)
File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 149, in async_resolve_external_data
return await self._token_request(
File “/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py”, line 178, in _token_request
resp.raise_for_status()
File “/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py”, line 941, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message=‘Unauthorized’, url=URL(‘https://www.googleapis.com/oauth2/v4/token’)
mostlychris - thanks for the help on this. Another poster elliotledger got me most of the way there - it was to upgrade HA to latest version - that resolved the error message!
Double check your nest block and all things there are correct for your auth settings. Also try a browser that has logged into the google account your nest devices are on.
Hi Chris - sometimes assuming pays off
Had copied / pasted the client secret into the block twice - cleaned it up and have successfully installed the integration - really appreciate the help!
Seems to be an issue with special characters. What’s interesting is i changed the thermostat name in Nest and fired up an HA instance on a different machine with AppDaemon and the problem persists. I’m going to check now to see whats coming down from Google.
Update - name is correct in Google permissions (changed name). Something must be being cached someplace.
Thanks but I tried your way and I still get the error. I’m running HA 0.117.2…
Logger: homeassistant.helpers.service
Source: helpers/service.py:447
First occurred: 2:31:04 AM (4 occurrences)
Last logged: 2:04:08 PM
Unable to find referenced entities climate.inside_nest_thermostat
Thanks for all the work on this integration, everyone!
I followed @Townsmcp’s instructions above (36 steps from Nov02) exactly… twice. The first time I used a project and creds I had created last month while playing around with Google Device Access on my own. The second time was creating everything clean, exactly as the instructions mention.
I’m running HA 0.117.2 supervised on a Linux box.
When I get to step 31 and I add the Nest Integration, it takes me to https://nestservices.google.com/partnerconnections/MyProjectName/auth?response_type=code... and displays the message “Something went wrong” “Please contact the devleoper of this app if the issue persists”. This is on Google Chrome in a browser where I’m already authenticated to my Google account. I also tried using an incognito window and got the same results. I’m using the NabuCasa external URL to access HA when attempting to add the Nest integration.
I’m not using the value of home-assistant for subscriber-id as described above when this message was also mentioned.
My configuration.yaml:
nest:
client_id: [matches "OAuth client ID" value in project details in Device Access Console]
client_secret: [matches "Client secret" value for credentials with above Client ID]
project_id: [matches name of Project in Device Access Console]
subscriber_id: projects/sdm-prod/topics/enterprise-[matches Pub/Sub topic listed in project details on Device Access Console]
@erikg for line 14, when adding the URL to the project, you didn’t add a port number did you? If the URL is incorrect it won’t prompt you for the Google account to authenticate to
Good point.
Perhaps the prerequisites/step 14 should differentiate between nabu.casa and non-nabu.casa just to be crystal clear…
https://[xxx].ui.nabu.casa/auth/external/callback
https://[your_duckdns_name].duckdns.org:[your_custom_port|8123]/auth/external/callback
https://[your.FQDN]:[your_custom_port|8123]/auth/external/callback
Rather than trying to be too explicit, can’t this just be:
[your_external_url]/auth/external/callback
Being just the URL that has been configured in the HASS GUI. Though I assume it may be slightly different for Nabu Casa. I’m not sure you need to call out duckdns separately, personally I use NOIP.
EDIT: Having read again, it is different for Nabu Casa, so two examples, but do you need three?