4.6 KiB
layout | title | description | date | sidebar | comments | sharing | footer | logo | ha_category | featured | ha_iot_class |
---|---|---|---|---|---|---|---|---|---|---|---|
page | Nest | Instructions on how to integrate Nest into Home Assistant. | 2016-01-29 21:57 | true | false | true | true | nest.png | Hub | true | Cloud Push |
The Nest component is the main component to integrate all Nest related platforms. To connect Nest, you will have to sign up for a developer account and get a client_id
and client_secret
.
{% linkable_title Setting up developer account %}
- Visit Nest Developers, and sign in. Create an account if you don't have one already.
- Fill in account details:
- The "Company Information" can be anything. We recommend using your name.
- Submit changes
- Click "Products" at top of page.
- Click "Create New Product"
- 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
- 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.
- Click "Create Product"
- 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
andclient_secret
below. - Once Home Assistant is started, a configurator will pop up asking you to log into your Nest account and copy a PIN code into Home Assistant.
Connecting to the Nest Developer API requires outbound port 9553 on your firewall. The configuration will fail if this is not accessible.
{% linkable_title Configuration %}
# Example configuration.yaml entry
nest:
client_id: CLIENT_ID
client_secret: CLIENT_SECRET
# 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 %}
{% linkable_title Services %}
Currently there is a single nest.set_mode
service available to switch between
"away" and "home" modes. This service requires a home_mode
param and has an
optional structure
param. While setting "away" mode, an estimated arrival time
can also be set with eta
, eta_window
, and trip_id
parameters.
- home_mode (Required):
home
oraway
- structure (Optional): Structure(s). Default apply to all structures connected with Home Assistant.
- eta (Optional): Estimated Time of Arrival from now.
- eta_window (Optional): ETA window (default is 1 minute).
- trip_id (Optional): Unique ID for the trip. Using an existing trip ID will update that trip's ETA.
# Example script to set away, no structure specified so will execute for all
set_nest_away:
sequence:
- service: nest.set_mode
data:
home_mode: away
# Example script to set home, structure specified
set_nest_home:
sequence:
- service: nest.set_mode
data:
home_mode: home
structure:
- Building
# Example script to set eta, structure specified
set_nest_eta:
sequence:
- service: nest.set_mode
data:
home_mode: away
structure:
- Building
eta: 00:10:30
eta_window: 00:05
{% linkable_title Troubleshooting %}
- If you're getting rickrolled 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.