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

Conversation

Projects
None yet
4 participants
@marchingphoenix
Copy link
Contributor

commented Nov 29, 2018

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),

This comment has been minimized.

Copy link
@balloob

balloob Nov 29, 2018

Member

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

Drop extra fan speeds.
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

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA

@ghost ghost removed the in progress label Nov 29, 2018

balloob added a commit that referenced this pull request Nov 29, 2018

BUGFIX: handle extra fan speeds. (#18799)
* 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 referenced this pull request Nov 29, 2018

Merged

0.83.1 #18811

@marchingphoenix marchingphoenix deleted the marchingphoenix:patch-1 branch Nov 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.