If you are using HASSIO on Raspberry or similar, it is under the “Supervisor” tab, and then “Add-on Store”. Once you have it up and running, you will need to modify the apps.yaml (sample is included in GitHub) file under config/appdaemon/apps, and upload the nest.py file. You will need to add the keys to your secrets.yaml file.
I know it is not pretty, but didn’t feel like doing a build with a test setup for full integration. This lets me prototype faster, and work out the logic. However, the down side is it is not point and click.
Thanks for clarifying that! I managed to figure out the above with some smart googling and got appdaemon installed and your app configured. Just working through the ‘refresh_token’ part now as I did not have that from before…
Let me know if you something doesn’t work. For whatever reason, I think it is due to the lack of low level integration, the Lovelace visualization doesn’t allow you to alter the temp, but works fine if you call the service “climate.set_temperature”. I tried to get the error checking for incomplete calls, but I haven’t fully baked the testing.
Maybe some of the logic will help the others.
I don’t have NEST camera’s so I didn’t build any support.
Note that I also create a temp sensor for each. The switch that is created is not fully implemented and really unneeded.
I read that and set an attribute called “unit_of_measure”. I think I updated it correctly for celsius, which is really to do no conversion if that trait is “CELSIUS”.
I am not willing to change mine to test, and not sure the attribute is named correctly. I pulled it from an existing temp sensor…
Hi. I’m having a little problem. I have AppDaemon running and connected to my Nest config. I have 3 thermostats, 2 are showing up fine. 1 is erroring out as follows:
2020-11-03 04:31:02.583921 WARNING nest: nest: Entity climate.theresa’s_room_nest_thermostat not found in namespace default
2020-11-03 04:31:02.584808 INFO AppDaemon: nest: Entity climate.theresa’s_room_nest_thermostat created in namespace: default
2020-11-03 04:31:02.611505 WARNING HASS: Error setting Home Assistant state default.climate.theresa’s_room_nest_thermostat, {‘state’: ‘on’, ‘attributes’: {‘friendly_name’: ‘Theresa’s Room Nest Thermostat’, ‘entity_id’: ‘climate.theresa’s_room_nest_thermostat’, ‘hvac_mode’: ‘heat’, ‘preset_mode’: ‘heat’, ‘hvac_modes’: [‘heat’, ‘cool’, ‘heat_cool’, ‘off’], ‘preset_modes’: [‘heat’, ‘cool’, ‘heat_cool’, ‘off’], ‘current_temperature’: 62.2, ‘current_humidty’: 51, ‘hvac_action’: ‘idle’, ‘supported_features’: 19, ‘temperature’: 60.1}}
2020-11-03 04:31:02.612562 WARNING HASS: Code: 500, error: 500 Internal Server Error
Server got itself in trouble
2020-11-03 04:31:02.614989 WARNING nest: nest: Entity sensor.theresa’s_room_nest_thermostat_temp not found in namespace default
2020-11-03 04:31:02.616069 INFO AppDaemon: nest: Entity sensor.theresa’s_room_nest_thermostat_temp created in namespace: default
2020-11-03 04:31:02.636389 WARNING HASS: Error setting Home Assistant state default.sensor.theresa’s_room_nest_thermostat_temp, {‘state’: 62.2, ‘attributes’: {‘device_class’: ‘temperature’, ‘friendly_name’: ‘Theresa’s Room Nest Thermostat Temperature’}}
2020-11-03 04:31:02.637869 WARNING HASS: Code: 500, error: 500 Internal Server Error
Server got itself in trouble
2020-11-03 04:31:02.641819 WARNING nest: nest: Entity switch.theresa’s_room_nest_thermostat_switch not found in namespace default
2020-11-03 04:31:02.651101 INFO AppDaemon: nest: Entity switch.theresa’s_room_nest_thermostat_switch created in namespace: default
2020-11-03 04:31:02.681280 WARNING HASS: Error setting Home Assistant state default.switch.theresa’s_room_nest_thermostat_switch, {‘state’: ‘on’, ‘attributes’: {‘friendly_name’: ‘Theresa’s Room Nest Thermostat Switch’}}
2020-11-03 04:31:02.682184 WARNING HASS: Code: 500, error: 500 Internal Server Error
Server got itself in trouble
Daniel, the temp difference is due to the NEST interface in the app rounding to the nearest .5, but he API provide a reading out to 4 decimal places. I round it to 1 decimal place. You will notice when you turn the dial on your NEST that you get multiple clicks before the number changes, but he API is recording it more precisely. HOWEVER, this set in HASS only updates every 30 seconds, so if you are tinkering, you will need to wait 30 seconds between changes.
Pull the latest from GitHub. I suspect your issue is the presence of an apostrophe, “’”, in the name. As I said, I didn’t thoroughly and robustly error check. But I just added a bit to delete the apostrophe and proactively handle any hyphens in the entity id.
I am certain there are other characters I should look for, but again, this a temporary solution until the awesome developers at HASS get the fully baked solution.
I suspect that Google is looking at the demand analysis before doing more integrations, at least I would if I was in their shoes. So, the more people we have making regular calls to the API and the more registrations they get, the higher the chance that we get NEST Protect API published. At least, that is what I tell myself.
I dont know if this will help anyone, however I have documented the setup in a much easier way than the Google docs show:
Prerequisites - obtain external address and add the subdomain location /auth/external/callback, eg with Nabu Casa (NOTE - do not add a port to the address):
https://[xxx].ui.nabu.casa/auth/external/callback
For non Nabu Casa users (probably need to add your port number):
https://[your_external_url]/auth/external/callback
Click on blue box with Enable.
NEW INSTRUCTIONS AT THIS POINT - SEE BELOW!
Go back to HA, File Editor, configuration.yaml.
Add the following lines and corresponding codes and change to your values:
nest:
client_id: xxx.apps.googleusercontent.com
client_secret: xxx
project_id: xxx-xxx-xxx-xxx-xxx
subscriber_id: %SEE POINT N BELOW%
Save the changes.
Reboot HA.
When HA has rebooted, use the external address eg Nabu Casa address, not the local IP address.
Go to Configuration.
Go to Integrations.
Add the Nest integration.
Select your Google account.
Tick all the options and click Next.
Choose your account.
A warning is displayed, click on Advanced and Go To the address.
Allow each popup.
Done!
ADDITIONAL UPDATE 13/11/2020:
In adidtion to the above, after reading updated release notes (found here) I have the following additional instructions, to perform between point 23 and 24 above:
A. Browse to Device Access Console here: https://console.nest.google.com/device-access.
B. Go into your project.
C. Make a note of the pub/sub topic (eg projects/sdm-prod/topics/enterprise-xxx-xxx-xxx-xxx-xxx).
D. Browse to Google Cloud Platform found here: https://console.cloud.google.com/cloudpubsub/subscription/list
E. Click on ‘Create Subscription’
F. In ‘Subscription ID’ field enter any value, eg ‘Nest’
G. Click the drop down title ‘Select a Cloud Pub/Sub topic’.
H. Click on ‘ENTER TOPIC MANUALLY’
I. Enter the full topic name from step C (eg projects/sdm-prod/topics/enterprise-xxx-xxx-xxx-xxx-xxx)).
J. Change ‘Message Retention’ to 1 hour rather than 7 days.
K. Click ‘Create’
L. Click into your new subscription.
M. Click the copy icon to the right of ‘Subscription name’, eg projects/nest-xxx/subscriptions/Nest
N. This value is the subscriber_id from configuration.yaml
@allenporter happy for you to include these instructions on the Gibhub page and HA Nest Integration page.
I’m okay with that. Any idea why my automation to change the temperature is failing?
Logger: homeassistant.helpers.service
Source: helpers/service.py:447
First occurred: 2:31:04 AM (1 occurrences)
Last logged: 2:31:04 AM
Unable to find referenced entities climate.inside_nest_thermostat
I will look at it later, have to head out. Might be related to the created entity being in the wrong domain? Not sure, will have to tinker when I get some time.
Presently, the entities go into the “default” domain. I know there are others, could be the culprit???
Hi, that’s what I suspected. First I changed the name of the the thermostat and for some reason it’s retaining the old name (in appdaemon not nest), I then replaced nest.py as you suggested and I still have the same issue.