Nest Legacy Integration for Home Assistant
This is a custom component for Home Assistant to integrate a wide range of Nest devices using an unofficial web API. It serves as an alternative to the official Nest integration, providing support for devices not available through Google’s official Smart Device Management (SDM) API, such as the Nest Protect, Nest x Yale Lock, and Nest Heat Link.
This integration provides real-time updates for most sensors and controls by maintaining a persistent connection to the Nest API.
Why use Nest Legacy?
The official Home Assistant Nest integration uses Google’s Smart Device Management (SDM) API, which has a limited set of supported devices and requires a one-time $5 fee. This Nest Legacy integration uses the same unofficial API that the Nest mobile and web apps use, offering several key advantages.
Comparison with the Official Nest Integration
| Feature | Nest Legacy (This Integration) | Official Nest Integration (SDM API) |
|---|---|---|
| API Used | Unofficial Nest Web API | Official Google SDM API |
| Cost | Free | $5 USD one-time fee required by Google |
| Authentication | Access Token (Nest Account) or Cookies (Google Account) | OAuth2 with Google Cloud Project |
| Supported Devices | Wider range, including Nest Protect, Nest Temp Sensors, Nest x Yale Locks, and Nest Heat Link. | Limited to newer Thermostats, Cameras, and Doorbells. |
| Stability | Relies on an unofficial API that could change or break without notice. | Officially supported by Google, more stable long-term. |
In short, use this integration if you want to:
- Integrate Nest Protects, Temperature Sensors, Locks, or Heat Links.
- Avoid the $5 Google API fee.
- Access features not exposed by the official API.
Supported Devices
This integration supports a wide variety of Nest devices:
- Nest Thermostats (1st, 2nd, 3rd gen, Thermostat E, 2020 mirror edition)
- Nest Protect (1st and 2nd gen, both wired and battery)
- Nest Temperature Sensors
- Nest Cameras (Cam Indoor, IQ Indoor, Outdoor, IQ Outdoor)
- Nest Doorbells (Wired 1st gen)
- Nest x Yale Locks
- Nest Heat Link (for UK/EU hot water control)
Features
This integration creates a rich set of entities for your Nest devices.
-
Nest Thermostat:
climateentity for full control over temperature and HVAC modes (Heat, Cool, Heat/Cool, Off).fanentity to control the fan independently.numberentity to configure the fan timer duration.binary_sensorfor occupancy and Eco Mode status.sensorfor humidity and backplate temperature.
-
Nest Protect:
binary_sensorentities for Smoke, Carbon Monoxide (CO), and Heat alarms.binary_sensorfor occupancy (wired models only).binary_sensorentities for diagnostic status (battery health, line power, component tests).sensorentities for battery level and replacement date.switchentities to control Pathlight, Nightly Promise, Heads-Up alerts, and Steam Check.selectentity to adjust the Pathlight brightness.
-
Nest Temperature Sensor:
sensorfor temperature and battery level.
-
Nest Cameras & Doorbells:
cameraentity with live streaming.switchentities to enable/disable streaming, audio, night vision, and the status LED.switchfor Indoor Chime and Visitor Announcements (Doorbells only).evententities that fire for doorbell presses, motion, person, sound, and face detection.
-
Camera Event Media Browser:
- A
media_sourceis provided, allowing you to browse, view, and download recent camera event clips and thumbnails directly from the Home Assistant Media Browser.
- A
-
Nest x Yale Lock:
lockentity to lock and unlock.sensorto show who performed the last lock/unlock action (keypad, manual, remote).binary_sensorfor tamper detection.switchto enable/disable auto-relock.numberentity to configure the auto-relock duration.
-
Nest Heat Link:
water_heaterentity for full control over your hot water system, including setting temperature, mode, and activating a boost.
-
Nest Home/Structure:
selectentity to set the home’s mode (Home, Away, Vacation).
Installation
HACS
- Add custom integrations repository:
https://github.com/tronikos/nest_legacy - Select “Nest Legacy” in the Integration tab and click download
- Restart Home Assistant
- Enable the integration
Configuration
After installation, the integration can be configured via the Home Assistant UI.
You will be asked to select your account type. Follow the instructions below based on your account.
Google Account Configuration
For accounts migrated to Google, or created after August 2019. You will need to retrieve an issue_token and cookies from your browser.
(Instructions adapted from the excellent homebridge-nest project).
- Open a Chrome browser tab in Incognito Mode.
- Open Developer Tools (View > Developer > Developer Tools, or
Ctrl+Shift+I/Cmd+Option+I). - Click on the Network tab. Make sure Preserve Log is checked.
- In the ‘Filter’ box, enter
issueToken. - Go to
home.nest.com, and click Sign in with Google. Log into your account. - One network call (beginning with
iframerpc) will appear in the Dev Tools window. Click on it. - In the Headers tab, under General, copy the entire Request URL. This is your
Issue token. - Clear the filter box and now enter
oauth2/iframe. - Several network calls will appear. Click on the last
iframecall. - In the Headers tab, under Request Headers, find the
cookieentry. Copy the entire cookie string (it will be very long). This is yourCookies. - Paste these values into the Home Assistant configuration form.
- Do not log out of
home.nest.com, as this will invalidate your credentials. Just close the browser tab.
Legacy Nest Account Configuration
For older, non-migrated Nest accounts. You will need to obtain an access_token.
- Go to
https://home.nest.comin your browser and log in. - Once logged in, open a new tab and go to
https://home.nest.com/session. - You will see a long string of text. Find
"access_token": "..."near the beginning. - Copy the value inside the quotes (it’s a long sequence of letters, numbers and punctuation beginning with
b). This is yourAccess token. - Paste this value into the Home Assistant configuration form.
- Do not log out of
home.nest.com, as this will invalidate your credentials. Just close the browser tab.
Field Test Environment
If you are part of the Google Field Test program, check the “Use Field Test environment” box during setup.
Credits
This integration would not be possible without the extensive research and work done by these projects:
- https://github.com/chrisjshull/homebridge-nest
- https://github.com/n0rt0nthec4t/homebridge-nest-accfactory
- https://github.com/iMicknl/ha-nest-protect
Disclaimer
This is a personal hobby project and is not affiliated with Google or Nest. It uses an unofficial API that could be changed or discontinued by Google at any time, which may cause this integration to stop working. It is provided “as-is,” with no warranty whatsoever. Use at your own risk.
Note I’ve only tested this with Nest Protect, Nest Camera, Nest Doorbell, and Nest Lock. If you encounter any issues with Nest Thermostat or Nest Heat Link open an issue or even better open a pull request.

