Google-Nest Offical Device Access Console Finally Released!

I think I recall seeing that Nest uses C internally but when user selects F the thermostat converts it to F using (# °C × 9/5) + 32 = # °F . I just switched my Nest to F. No change in HA until I restarted the integration then I saw 71 C (kinda warm!) then changed HA from metric to imperial and I don’t see a rounding problem…

You could template it and use the templated sensor in the climate card.

Original number:            {{ states.sensor.garage_sensor_air_temperature.state }}
Round to nearest 0.5:       {{ (states.sensor.garage_sensor_air_temperature.state|float * 2)| round / 2 }}
Add 0.5 and to nearest 0.5: {{ ((states.sensor.garage_sensor_air_temperature.state|float + 0.5) * 2 )|round / 2 }}

2 Likes

Nice work. Thank you so much. I have implemented your custom vertical stack card using the custom thermostat-card for my two thermostats. This is great, getting much closer to what I am looking for. I will be happy to implement any improvements which you make. I would like to contribute in some way but I am not a python programer either.

I’m still using the original Works With Nest API. Is there any reason I should switch to this one?

type: picture-glance
title: Front Door
image: camera.front_door
entities:
  - entity: camera.front_door
camera_image: camera.front_door
entity: camera.front_door

Hello,

now I have also the Climate entities :slight_smile:
But the t° not change, if I restart the integration it’s change but not automaticly.
I use the last update release 2020.11.0.

Any idea ?

I’m having success all the way up to HA seeing any entities. I have successfully done the integration- but the integration card just says “configuration.yaml” underneath and I have no entities found. Did I miss a step somewhere? Do I need to add something to the config file?

I’m having the same issue. Not sure how similar your setup is to mine but I’m adding details below.

Followed Maarten’s directions above and had no errors. Nest integration seemed to work and I allowed access but no devices or entities are displaying in HA.

nest

When I look at the logs I’m seeing the following:

2020-11-21 19:47:07 ERROR (MainThread) [homeassistant.components.climate] Error while setting up nest platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/nest/climate.py", line 18, in async_setup_entry
    await async_setup_sdm_entry(hass, entry, async_add_entities)
  File "/usr/src/homeassistant/homeassistant/components/nest/climate_sdm.py", line 83, in async_setup_sdm_entry
    device_manager = await subscriber.async_get_device_manager()
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/google_nest_subscriber.py", line 97, in async_get_device_manager
    return await self._device_manager_task
  File "/usr/src/homeassistant/homeassistant/components/nest/camera.py", line 18, in async_setup_entry
    await async_setup_sdm_entry(hass, entry, async_add_entities)
  File "/usr/src/homeassistant/homeassistant/components/nest/camera_sdm.py", line 35, in async_setup_sdm_entry
    device_manager = await subscriber.async_get_device_manager()
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/google_nest_subscriber.py", line 97, in async_get_device_manager
    return await self._device_manager_task
  File "/usr/src/homeassistant/homeassistant/components/nest/sensor.py", line 19, in async_setup_entry
    await async_setup_sdm_entry(hass, entry, async_add_entities)
  File "/usr/src/homeassistant/homeassistant/components/nest/sensor_sdm.py", line 36, in async_setup_sdm_entry
    device_manager = await subscriber.async_get_device_manager()
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/google_nest_subscriber.py", line 97, in async_get_device_manager
    return await self._device_manager_task
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/google_nest_subscriber.py", line 106, in _async_create_device_manager
    devices = await self._api.async_get_devices()
  File "/usr/local/lib/python3.8/site-packages/google_nest_sdm/google_nest_api.py", line 46, in async_get_devices
    devices = response_data["devices"]
KeyError: 'devices'

I added Climate: to my configuration.yaml but this didn’t help. Can’t tell if I need any other files for HA to recognize the nest integration.

I made a change to fails more gracefully/silently when this happens, but the main problem is the api is not returning any devices for your requests. You authorized a decide in the oauth consent flow?

Julek found the solution and posted in the comments of the blog post:

Thank you for this. Really helpful!
The only thing I was missing is that I needed to enable the “Smart Device Management API” to get it to work.

From https://developers.google.c…

Thumbnail

Then

Thumbnail

2 Likes

I too was using the Works API, but decided to changed over as eventually this solution will have a heck more functionality that the Nest Works approach. I’d suggest you update HA to the latest release as this support most of what you’ll require relative to Refresh token execution.

I got a lot of guidance watching a video https://youtu.be/_Wex2SLmEJ8?t=278 from @mostlychris to attain the prerequisites in setting up the requirements for entering into configuration.yaml. This integration brings us closer to the way it should be. Shout out to @allenporter!!

Anyone had this kind of error…

Authorization Error
Error 403: access_denied
The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer ([email protected])

Did all the steps from the instruction, passed the screen with the massage “This integration is not tested and approved by Google for commercial bla bla”, choose my email account and then i got this massage above :frowning:

I believe you have to click Advanced and then proceed anyway to indicate that you’re ok with it.

No Advanced button or any kind of button on error page unfortunately

Ah sorry I was thinking of the Chrome warning. I’d double check all the steps, and also make sure you’re using the right account.

I’ve heard this may happen when the Smart Device Management API is not enabled in the cloud console, so double check that step:
https://developers.google.com/nest/device-access/get-started#set_up_google_cloud_platform

Have the API enabled.

Trying now from the companion app without WiFi enabled. Removed the integration and re-added it. From the companion app I get an error after adding and signing into my google account. “Can’t link to [device name]”

I have my external URL set to http://xxx.duckdns.org:8123/auth/external/callback

Having updated to v0.118.2 today I’ve now got access to our single thermostat with control, which is great.

I also have some access to the camera in our Google Nest Hub Max, which I’m assuming is still a work in progress? The camera is only enabled when we’re not at home, however I’ve done some testing today with the camera enabled and disabled.
I’d appreciate it if anyone can verify that what I’m seeing currently is expected:

  1. When the camera is enabled I can get an image displayed in a picture-glance card using the camera object. When the camera is disabled I lose the image after a period of time.

  2. When active I can use camera.snapshot etc.

  3. The camera state remains “idle” regardless of whether it is enabled or disabled.

  4. Accessing the camera entity “more info” object hangs homeassistant completely and I have to restart to regain access.

  5. No errors are logged in HA (default logging set)

  6. I’m seeing a report of 100% errors in the Google console for google.pubsub.v1.Subscriber.StreamingPull
    If I filter the displayed metrics by StreamingPull the response code seems to be 400 which translates to: billing not enabled or Pub/Sub cannot access the [customer-managed encryption key (https://cloud.google.com/pubsub/docs/cmek) used with StreamingPull or Pull.

    NB: I currently don’t have billing enabled on the console, but I’ve seen no mention that this is required.

Is there a way to work off of the camera motion events in Node Red or native Automations? I saw this reddit post but it appears the Nest Integration already consumes the pub/sub messages. Is there a way to access these events from/through the integration? Thanks in advance.

  1. That might be a bug, or incorrect indentation of the camera entity. Not sure what the right behavior.is supposed to be.

  2. Can you file an issue for that? Doesn’t sound good.

  3. Double check the subscription Id is correct? I think the 400 could be other problems. Next release has better debugging error messages for subscriber issues.

Events are in progress. They are received by the subscriber, but home assistant doesn’t know how to interpret them yet.

3 Likes