New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade python-nest, add security_state sensor, nest.set_mode service set ETA as well #14901

Merged
merged 5 commits into from Jun 12, 2018

Conversation

Projects
None yet
4 participants
@awarecan
Contributor

awarecan commented Jun 10, 2018

Description:

Upgrade python-nest to 4.0.2, which allows follows changes possible.

Add security_state sensor

security_state is provided by Nest Security API, please note, it is NOT API for Nest Secure Alarm System.
You can use this sensor to convert your HA + Nest Cam to a cheap security system

When all family members are away from home, the structure enters away mode. When a Nest Cam detects a person, the Camera API's /last_event/has_person field changes to true.

These two states work together to trigger the Works with Nest Security API, as follows:

  • If a Nest Cam detects the presence of a person while the structure is in away mode, the structure enters deter mode.
  • When your product detects that the structure is in deter mode, your product can make the home "pretend" to be occupied by altering the home environment in some way, such as turning on the lights, playing music, or opening blinds to make an intruder more visible.

In this way, the home becomes a less inviting target for attack.

Set ETA

nest.set_mode service extended to allow set ETA when you set away mode.

In some cases, users have a 3rd-party app that uses GPS to provide estimated time of arrival (ETA) data to the Nest API. In other cases, the user might use an app to manually enter their ETA. Or maybe the ETA is calcluated based on the user's regular schedule.

ETA apps that are integrated with the Nest Thermostat cause the thermostat to begin warming or cooling the home before the user arrives.

When the ETA/thermostat integration exists in the user's account, the ETA data is available for other Works with Nest developers to use in their Works with Nest integrations.

After the ETA is input into the Nest service, another Works with Nest integration can use it as a signal to prepare the home for the user's arrival.

See here for more information

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5518

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
@MartinHjelmare

Looks good! Small comment on grammar.

description: Optional ETA window. Default is 1 minute.
example: 0:5
trip_id:
description: Optional the identity of a trip. Use same trip_id will update the estimation for a trip.

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Jun 10, 2018

Member

Optional identity of a trip. Using the same trip_ID will update...

@MartinHjelmare

This comment has been minimized.

Member

MartinHjelmare commented Jun 10, 2018

Can be merged when build passes.

@syssi syssi merged commit 30111ea into home-assistant:dev Jun 12, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 94.001%
Details

@wafflebot wafflebot bot removed the in progress label Jun 12, 2018

vol.Required(ATTR_HOME_MODE): vol.In([HOME_MODE_AWAY, HOME_MODE_HOME]),
vol.Optional(ATTR_STRUCTURE): vol.All(cv.ensure_list, cv.string),
vol.Optional(ATTR_TRIP_ID): cv.string,
vol.Optional(ATTR_ETA): cv.time_period_str,

This comment has been minimized.

@syssi

syssi Jun 12, 2018

Member

Please use a time_period instead of time_period_str.

This comment has been minimized.

@awarecan

awarecan Jun 12, 2018

Contributor

Fix in #14938

@awarecan awarecan referenced this pull request Jun 12, 2018

Merged

Use cv.time_period instead of cv.time_period_str #14938

2 of 2 tasks complete

@balloob balloob referenced this pull request Jun 22, 2018

Merged

0.72 #15088

MizterB added a commit to MizterB/home-assistant that referenced this pull request Aug 11, 2018

cyberjacob pushed a commit to cyberjacob/home-assistant that referenced this pull request Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment