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

BUGFIX: handle extra fan speeds. #18799

Merged
merged 3 commits into from
Nov 29, 2018
Merged

BUGFIX: handle extra fan speeds. #18799

merged 3 commits into from
Nov 29, 2018

Conversation

marchingphoenix
Copy link
Contributor

Description:

mqtt and zha fans either have or can have extra speed modes other than the default 4 [off, low, medium, high]
When these are present, it was breaking the payload sent to GA.
Added support for these additional speeds but they will not have additional aliases.

Related issue (if applicable): fixes #18798

**Pull request in home-assistant.io with documentation (if applicable): Not Applicable

Example entry for configuration.yaml (if applicable):

Not Applicable

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.
    Not applicable

If the code does not interact with devices:

  • [z] Tests have been added to verify that the new code works.

@ghost ghost added the in progress label Nov 29, 2018
@marchingphoenix marchingphoenix changed the title BUGFIX: add support for extra fan speeds. BUGFIX: handle extra fan speeds. Nov 29, 2018
@@ -717,7 +717,7 @@ def sync_attributes(self):
speed = {
"speed_name": mode,
"speed_values": [{
"speed_synonym": self.speed_synonyms.get(mode),
Copy link
Member

Choose a reason for hiding this comment

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

if the mode is not one of our official supported ones, we should ignore it.

Remove catch all, drop missing fan speeds.
@balloob balloob added this to the 0.83.1 milestone Nov 29, 2018
@balloob balloob merged commit 4e27262 into home-assistant:dev Nov 29, 2018
@ghost ghost removed the in progress label Nov 29, 2018
balloob pushed a commit that referenced this pull request Nov 29, 2018
* BUGFIX: add support for extra fan speeds.

* Drop extra fan speeds.

Remove catch all, drop missing fan speeds.

* fix self.speed_synonyms call. Remove un-needed keys() call
@balloob balloob mentioned this pull request Nov 29, 2018
@marchingphoenix marchingphoenix deleted the patch-1 branch November 30, 2018 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google Assistant Can't Control Fan Speed for Fans with Extra Speed Options
4 participants