Skip to content

Conversation

@mkowalchuk
Copy link
Contributor

@mkowalchuk mkowalchuk commented Nov 28, 2021

Breaking change

This may change which fan speed is selected at certain percentages for the GE/Jasco 12730 and 14287 fan controllers.

Proposed change

Explicitly support the speed ranges used by the GE/Jasco 12730 and 14287 fan controllers, using (and extending) the mechanisms added in PR #59697.

I got the fan speed info from freshcoast on this thread:
https://community.home-assistant.io/t/requesting-info-on-speed-ranges-for-various-z-wave-fan-controllers-e-g-ge-jasco-leviton/360075/3

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

I did something a little unusual with the fixtures:

To adequately test the zwave_js fan component, we need to keep at least one fixture for a device where we don't have explicit speed information defined, to ensure that the fallback to 0-100% selection is working. The current suite of tests uses in_wall_smart_fan_control_state.json, which is actually a GE/Jasco 12730, which this PR adds speed support for.

Somewhat interestingly, we actually have two different fixtures for the 12730: fan_ge_12730_state.json, and in_wall_smart_fan_control_state.json. Only in_wall_smart_fan_control_state.json was actually being used, so here's what I did:

  • Renamed in_wall_smart_fan_control_state.json to fan_generic_state.json, and mangled the manufacturer/product IDs so that it wouldn't be recognized as a GE/Jasco 12730. So this'll permanently be a "generic fan" fixture, representing all fan controllers that we don't have speed info for. This continues to be used for the main test in test_fan.py.
  • Used fan_ge_12730_state.json for additional tests for fan speed configuration.

Checklist

[~] The code change is tested and works locally.

  • I verified that HA starts, and I've verified that the FixedFanSpeedDataTemplate works by temporarily applying it to my FC200+, but I haven't tested with the actual GE/Jasco controllers.

  • Local tests pass. Your PR cannot be merged unless tests pass

  • There is no commented out code in this PR.

  • I have followed the development checklist

  • The code has been formatted using Black (black --fast homeassistant tests)

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

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

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @home-assistant/z-wave, mind taking a look at this pull request as it has been labeled with an integration (zwave_js) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@mkowalchuk mkowalchuk changed the title Add speed configurations for a GE/Jasco 12730 and 14287 fan controllers Add speed configurations for GE/Jasco 12730 and 14287 fan controllers Nov 29, 2021
@mkowalchuk mkowalchuk marked this pull request as ready for review November 29, 2021 01:21
@mkowalchuk mkowalchuk requested a review from a team as a code owner November 29, 2021 01:21
@kpine
Copy link
Contributor

kpine commented Nov 29, 2021

This is working for me. 👍🏻

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@MartinHjelmare MartinHjelmare changed the title Add speed configurations for GE/Jasco 12730 and 14287 fan controllers Add zwave_js speed configurations for GE/Jasco 12730 and 14287 fan controllers Nov 29, 2021
@MartinHjelmare MartinHjelmare changed the title Add zwave_js speed configurations for GE/Jasco 12730 and 14287 fan controllers Add zwave_js speed configurations for GE/Jasco 12730 and 14287 fans Nov 29, 2021
@MartinHjelmare MartinHjelmare merged commit 15bf4da into home-assistant:dev Nov 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2021
@mkowalchuk mkowalchuk deleted the gefans branch December 1, 2021 04:34
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.

4 participants