Skip to content
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

Allow setting climate devices to AUTO mode via Google Assistant #11923

Merged
merged 3 commits into from
Jan 26, 2018

Conversation

balloob
Copy link
Member

@balloob balloob commented Jan 26, 2018

Description:

We did not correctly support the AUTO operation mode of climate devices.

The old behavior would take all operation modes, lowercase them and see if they are one of the supported modes. Because of this, we missed the mapping between our AUTO mode and the Google Assistant "heat-cool" mode. This PR fixes it.

  • I've removed the casting to lowercase, as the operation list attribute should only use operations defined in climate.__init__.py, which are all lowercase.
  • I've removed the defaulting to 'off' if no mode was passed in. If Google violates their own message format, we should raise an error instead of trying to interpret intention. That will always backfire.

Tested new code locally with the Nest Home Simulator.

CC @philk

Checklist:

  • The code change is tested and works locally.

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.

@pvizeli pvizeli merged commit 390b727 into dev Jan 26, 2018
@pvizeli pvizeli deleted the fix-google-assistant-auto-mode branch January 26, 2018 11:37
balloob added a commit that referenced this pull request Jan 27, 2018
* Allow setting climate devices to AUTO mode via Google Assistant

* Remove cast to lower

* Clarify const name
@balloob balloob mentioned this pull request Jan 27, 2018
matemaciek pushed a commit to matemaciek/home-assistant that referenced this pull request Jan 27, 2018
* upstream/master: (465 commits)
  Update pyhomematic to 0.1.38 (home-assistant#11936)
  Implement Alexa temperature sensors (home-assistant#11930)
  Fixed rfxtrx binary_sensor KeyError on missing optional device_class (home-assistant#11925)
  Allow setting climate devices to AUTO mode via Google Assistant (home-assistant#11923)
  fixes home-assistant#11848 (home-assistant#11915)
  Add "write" service to system_log (home-assistant#11901)
  Update frontend to 20180126.0
  Version 0.62
  Allow separate command and state OIDs and payloads in SNMP switch (home-assistant#11075)
  Add ERC20 tokens to etherscan.io sensor (home-assistant#11916)
  Report scripts and groups as scenes to Alexa (home-assistant#11900)
  Minor fix to configuration validation and related log line. (home-assistant#11898)
  Multi-Room Support for Greenwave Reality (home-assistant#11364)
  Added Xeoma camera platform (home-assistant#11619)
  Improve foscam library exception support (home-assistant#11701)
  Iota wallet (home-assistant#11398)
  New venstar climate component (home-assistant#11639)
  Update python-wink version and multiple wink fixes/updates. (home-assistant#11833)
  Use API to discover Hue if no bridges specified (home-assistant#11909)
  Clarify emulated hue warning (home-assistant#11910)
  ...
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
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.

3 participants