Skip to content

Add service to set nest away/home modes#7619

Merged
balloob merged 2 commits into
home-assistant:devfrom
mattsch:nest_additions
Jun 5, 2017
Merged

Add service to set nest away/home modes#7619
balloob merged 2 commits into
home-assistant:devfrom
mattsch:nest_additions

Conversation

@mattsch
Copy link
Copy Markdown
Contributor

@mattsch mattsch commented May 16, 2017

Description:

  • New service nest.set_mode
  • Update the NestDevice object to export the local structures

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

Example entry for configuration.yaml (if applicable):

None

Checklist:

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

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

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

* New service `nest.set_mode`
* Update the NestDevice object to export the local structures
@homeassistant
Copy link
Copy Markdown
Contributor

Hi @mattsch,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@mention-bot
Copy link
Copy Markdown

@mattsch, thanks for your PR! By analyzing the history of the files in this pull request, we identified @technicalpickles, @fabaff and @pvizeli to be potential reviewers.

Comment thread homeassistant/components/nest.py Outdated

def set_mode(service):
"""Set the home/away mode for a Nest structure."""
if 'structure' in service.data:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a constante for that.

Comment thread homeassistant/components/nest.py Outdated

AWAY_SCHEMA = vol.Schema({
vol.Required(ATTR_HOME_MODE): cv.string,
vol.Optional(ATTR_STRUCTURE): vol.All(cv.ensure_list)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please validate the structure here like cv.string

@mattsch
Copy link
Copy Markdown
Contributor Author

mattsch commented Jun 1, 2017

@pvizeli I think I have those changes in properly, let me know if I misunderstood.

@balloob
Copy link
Copy Markdown
Member

balloob commented Jun 5, 2017

Thanks!

@balloob balloob merged commit c295535 into home-assistant:dev Jun 5, 2017
@balloob balloob mentioned this pull request Jun 16, 2017
@mattsch mattsch deleted the nest_additions branch July 5, 2017 14:41
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants