mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-28 05:46:48 +00:00

* Add year (2019) to warning about August changes * Updated link * HTML -> Markdown Co-authored-by: Franck Nijhof <frenck@frenck.nl>
353 lines
12 KiB
Markdown
353 lines
12 KiB
Markdown
---
|
|
title: Nest
|
|
description: Instructions on how to integrate Nest into Home Assistant.
|
|
ha_category:
|
|
- Hub
|
|
- Binary Sensor
|
|
- Camera
|
|
- Climate
|
|
- Sensor
|
|
ha_iot_class: Cloud Push
|
|
ha_release: 0.7
|
|
ha_config_flow: true
|
|
ha_codeowners:
|
|
- '@awarecan'
|
|
ha_domain: nest
|
|
---
|
|
|
|
The Nest integration is the main integration to integrate all [Nest](https://nest.com/) related platforms. To connect Nest, you will have to [sign up for a developer account](https://developers.nest.com/products) and get a `client_id` and `client_secret`.
|
|
|
|
There is currently support for the following device types within Home Assistant:
|
|
|
|
- [Binary Sensor](#binary-sensor)
|
|
- [Camera](#camera)
|
|
- [Climate](#climate)
|
|
- [Sensor](#sensor)
|
|
|
|
### Setting up developer account
|
|
|
|
<div class='note warning'>
|
|
|
|
New users are not currently able to set up a Works With Nest Developer account due to the change announced by Google. We will reach out to Nest to see if we can become a partner so that users joining Home Assistant after [August 2019](/blog/2019/05/08/nest-data-bye-bye/) can still use Nest. In the future we will add documentation on how to setup a Works With Google account and configure your Nest integration.
|
|
|
|
</div>
|
|
|
|
1. Visit [Nest Developers](https://developers.nest.com/), and sign in. Create an account if you don't have one already.
|
|
2. Fill in account details:
|
|
* The "Company Information" can be anything. We recommend using your name.
|
|
3. Submit changes
|
|
4. Click "[Products](https://developers.nest.com/products)" at top of page.
|
|
5. Click "[Create New Product](https://developers.nest.com/products/new)"
|
|
6. Fill in details:
|
|
* Product name must be unique. We recommend [email] - Home Assistant.
|
|
* The description, users, URLs can all be anything you want.
|
|
* Leave the "Redirect URI" Field blank
|
|
7. For permissions check every box and if it's an option select the read/write option. Note: there are important permissions under the "Other Permissions" category. If you are only adding a thermostat, do not just select the permissions under "Thermostat". You still need to check the boxes under "Other Permissions" in order to give you access to features like away mode, ETA, structure read/write, and postal code.
|
|
* The description requires a specific format to be accepted.
|
|
* Use "[Home Assistant] [Edit] [For Home Automation]" as the description as it is not super important.
|
|
8. Click "Create Product"
|
|
9. Once the new product page opens the "Product ID" and "Product Secret" are located on the right side. These will be used as `client_id` and `client_secret` below.
|
|
10. Add the Nest integration to your `configuration.yaml` and restart Home Assistant. Then, go to `Configuration > Integrations` and select `CONFIGURE` next to `Nest`. Click the link in the configurator pop up to log into your Nest account and complete the OAuth. Copy the resulting PIN code into the pop up.
|
|
|
|
Connecting to the Nest Developer API requires outbound port 9553 on your firewall. The configuration will fail if this is not accessible.
|
|
|
|
### Configuration
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
nest:
|
|
client_id: CLIENT_ID
|
|
client_secret: CLIENT_SECRET
|
|
```
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry to show only devices at your vacation and primary homes
|
|
nest:
|
|
client_id: CLIENT_ID
|
|
client_secret: CLIENT_SECRET
|
|
structure:
|
|
- Vacation
|
|
- Primary
|
|
```
|
|
|
|
{% configuration %}
|
|
client_id:
|
|
description: Your Nest developer client ID.
|
|
required: true
|
|
type: string
|
|
client_secret:
|
|
description: Your Nest developer client secret.
|
|
required: true
|
|
type: string
|
|
structure:
|
|
description: The structure or structures you would like to include devices from. If not specified, this will include all structures in your Nest account.
|
|
required: false
|
|
type: list
|
|
{% endconfiguration %}
|
|
|
|
### Service `set_away_mode`
|
|
|
|
You can use the service `nest/set_away_mode` to set the structure(s) to "Home" or "Away".
|
|
|
|
| Service data attribute | Optional | Description |
|
|
| ---------------------- | -------- | ----------- |
|
|
| `away_mode` | no | String, must be `away` or `home`.
|
|
| `structure` | yes | String, will default to all configured Nest structures if not specified.
|
|
|
|
Examples:
|
|
|
|
```yaml
|
|
# Example script to set away, no structure specified so will execute for all
|
|
script:
|
|
nest_set_away:
|
|
sequence:
|
|
- service: nest.set_away_mode
|
|
data:
|
|
away_mode: away
|
|
```
|
|
|
|
```yaml
|
|
# Example script to set home, structure specified
|
|
script:
|
|
nest_set_home:
|
|
sequence:
|
|
- service: nest.set_away_mode
|
|
data:
|
|
away_mode: home
|
|
structure:
|
|
- Apartment
|
|
```
|
|
|
|
### Service `set_eta`
|
|
|
|
You can use the service `nest/set_eta` to set or update the estimated time of arrival window. Calling this service will automatically set the structure(s) to "Away". Structures must have an associated Nest thermostat in order to use ETA function.
|
|
|
|
| Service data attribute | Optional | Description |
|
|
| ---------------------- | -------- | ----------- |
|
|
| `eta` | no | Time period, estimated time of arrival from now.
|
|
| `eta_window` | yes | Time period, estimated time of arrival window. Default is 1 minute.
|
|
| `trip_id` | yes | String, unique ID for the trip. Default is auto-generated using a timestamp. Using an existing `trip_id` will update that trip's ETA.
|
|
| `structure` | yes | String, will default to all configured Nest structures if not specified.
|
|
|
|
Examples:
|
|
|
|
```yaml
|
|
# Example script to set ETA, no structure specified so will execute for all
|
|
script:
|
|
nest_set_eta:
|
|
sequence:
|
|
- service: nest.set_eta
|
|
data:
|
|
eta: 00:10:30
|
|
trip_id: Leave Work
|
|
```
|
|
|
|
```yaml
|
|
# Example script to update ETA and specify window, structure specified
|
|
script:
|
|
nest_update_eta:
|
|
sequence:
|
|
- service: nest.set_eta
|
|
data:
|
|
eta: 00:11:00
|
|
eta_window: 00:05
|
|
trip_id: Leave Work
|
|
structure:
|
|
- Apartment
|
|
```
|
|
|
|
### Service `cancel_eta`
|
|
|
|
You can use the service `nest/cancel_eta` to cancel an existing estimated time of arrival window. Structures must have an associated Nest thermostat in order to use ETA function.
|
|
|
|
| Service data attribute | Optional | Description |
|
|
| ---------------------- | -------- | ----------- |
|
|
| `trip_id` | no | String, unique ID for the trip. Using an existing `trip_id` will update that trip's ETA.
|
|
| `structure` | yes | String, will default to all configured Nest structures if not specified.
|
|
|
|
Examples:
|
|
|
|
```yaml
|
|
# Example script to cancel ETA, no structure specified so will execute for all
|
|
script:
|
|
nest_cancel_eta:
|
|
sequence:
|
|
- service: nest.cancel_eta
|
|
data:
|
|
trip_id: Leave Work
|
|
```
|
|
|
|
```yaml
|
|
# Example script to cancel ETA, structure specified
|
|
script:
|
|
nest_cancel_eta:
|
|
sequence:
|
|
- service: nest.cancel_eta
|
|
data:
|
|
trip_id: Leave Work
|
|
structure:
|
|
- Apartment
|
|
```
|
|
|
|
### Troubleshooting
|
|
|
|
- If you're getting [rickrolled](https://www.youtube.com/watch?v=dQw4w9WgXcQ) instead of being able to see your Nest cameras, you may not have set up your developer account's permissions correctly. Go back through and make sure you've selected read/write under every category that it's an option.
|
|
|
|
## Platforms
|
|
|
|
<div class='note'>
|
|
|
|
You must have the [Nest component](/integrations/nest/) configured to use the platforms below.
|
|
|
|
</div>
|
|
|
|
## Binary Sensor
|
|
|
|
The `nest` binary sensor platform lets you monitor various states of your [Nest](https://nest.com) devices.
|
|
|
|
<div class='note'>
|
|
|
|
You must have the [Nest component](/integrations/nest/) configured to use these sensors. The binary sensors will be setup if the `nest` integration is configured and the required configuration for the `nest binary sensor` is set.
|
|
|
|
</div>
|
|
|
|
## Configuration
|
|
|
|
To enable binary sensors and customize which sensors are setup, you can extend the [Nest component](/integrations/nest/) configuration in your `configuration.yaml` file with the following settings:
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
nest:
|
|
binary_sensors:
|
|
monitored_conditions:
|
|
- 'fan'
|
|
- 'target'
|
|
```
|
|
|
|
By default all binary sensors for your available Nest devices will be monitored. Leave `monitored_conditions` blank to disable all binary sensors for the [Nest component](/integrations/nest/).
|
|
|
|
{% configuration %}
|
|
monitored_conditions:
|
|
description: States to monitor.
|
|
required: false
|
|
type: list
|
|
{% endconfiguration %}
|
|
|
|
The following conditions are available by device:
|
|
|
|
- Nest Home:
|
|
- away
|
|
- Nest Thermostat:
|
|
- online
|
|
- fan
|
|
- is\_using\_emergency\_heat
|
|
- is\_locked
|
|
- has\_leaf
|
|
- Nest Protect:
|
|
- online
|
|
- Nest Camera:
|
|
- online
|
|
- motion\_detected
|
|
- person\_detected
|
|
- sound\_detected
|
|
|
|
## Camera
|
|
|
|
The `nest` platform allows you to watch still frames from a video stream (not live stream) of your [Nest](https://nest.com/camera/meet-nest-cam/) camera in Home Assistant.
|
|
|
|
<div class='note'>
|
|
|
|
The `nest` camera will automatically be setup when you do.
|
|
|
|
</div>
|
|
|
|
Nest Camera supports the `camera.turn_on` and `camera.turn_off` services since the 0.75 release.
|
|
|
|
## Climate
|
|
|
|
The `nest` climate platform lets you control a thermostat from [Nest](https://nest.com).
|
|
|
|
<div class='note'>
|
|
Please note due to limitations with the European Nest Thermostat E, integration with Home Assistant for that thermostat is not possible.
|
|
</div>
|
|
|
|
<p class='img'>
|
|
<img src='{{site_root}}/images/screenshots/nest-thermostat-card.png' />
|
|
</p>
|
|
|
|
## Sensor
|
|
|
|
The `nest` sensor platform lets you monitor sensors connected to your [Nest](https://nest.com) devices.
|
|
|
|
<div class='note'>
|
|
|
|
The sensors will be setup if the `nest` integration is configured and the required configuration for the `nest sensor` is set.
|
|
|
|
</div>
|
|
|
|
## Configuration
|
|
|
|
To enable sensors and customize which sensors are setup, you can extend the [Nest component](/integrations/nest/) configuration in your `configuration.yaml` file with the following settings:
|
|
|
|
```yaml
|
|
# Example configuration.yaml entry
|
|
nest:
|
|
sensors:
|
|
monitored_conditions:
|
|
- 'temperature'
|
|
- 'target'
|
|
```
|
|
|
|
By default all sensors for your available Nest devices will be monitored. Leave `monitored_conditions` blank to disable all sensors for the [Nest component](/integrations/nest/).
|
|
|
|
{% configuration %}
|
|
monitored_conditions:
|
|
description: States to monitor.
|
|
required: false
|
|
type: list
|
|
{% endconfiguration %}
|
|
|
|
The following conditions are available by device:
|
|
|
|
- Nest Home:
|
|
- `eta`: Estimated time of arrival.
|
|
- `security_state`: `ok` or `deter`. [Security State](#security-state). Only available when Nest Camera exists.
|
|
- Nest Thermostat:
|
|
- `humidity`
|
|
- `preset_mode`
|
|
- `temperature`
|
|
- `target`
|
|
- `hvac_state`: The currently active state of the HVAC system, `heat`, `cool` or `off` (previously `heating`, `cooling` or `off`).
|
|
- Nest Protect:
|
|
- `co_status`: `Ok`, `Warning` or `Emergency`
|
|
- `smoke_status`: `Ok`, `Warning` or `Emergency`
|
|
- `battery_health`: `Ok` or `Replace`
|
|
- `color_status`: `gray`, `green`, `yellow` or `red`. Indicates device status by color in the Nest app UI. It is an aggregate condition for battery+smoke+CO states, and reflects the actual color indicators displayed in the Nest app.
|
|
- Nest Camera: none
|
|
|
|
## Security State
|
|
|
|
<div class='note warning'>
|
|
|
|
This feature is not designed to transform your Home Assistant into a security system, neither Home Assistant nor Nest be liable to You for damages,
|
|
or consequential damages of any character arising as a result of use this feature.
|
|
|
|
This feature does not depend on the [Nest Secure alarm system](https://nest.com/alarm-system/overview/) and is not a reflection of the status of that system,
|
|
nor does it react to state changes in that system.
|
|
|
|
</div>
|
|
|
|
<div class='note'>
|
|
|
|
This feature uses a new [Nest Security API](https://developers.nest.com/documentation/cloud/security-guide).
|
|
You may need to change your ["Product"](https://developers.nest.com/products) permission setting to include `Security State Read`.
|
|
After this permission change, you may need to re-authorize your client.
|
|
|
|
</div>
|
|
|
|
If a Nest Cam detects the presence of a person (see `person_detected` in [binary_sensor.nest](#binary-sensor) while the structure is in `away` mode (see `away` in [binary_sensor.nest](#binary-sensor), the structure enters `deter` mode.
|
|
|
|
A `deter` state is re-evaluated after several minutes and relaxed to `ok` if no further `person_detected` events have occurred.
|
|
|
|
The `security_state` automatically switches to `ok` when the structure state is `home`.
|