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

Refactor fan platform to resemble climate/cover platforms #2848

Merged
merged 14 commits into from Jan 23, 2022

Conversation

oxan
Copy link
Member

@oxan oxan commented Dec 1, 2021

What does this implement/fix?

Refactor the fan platform to follow the design of the climate and cover platforms, which have better state handling and separation of concerns.

The current FanState class is left working, but is deprecated, so custom components should keep working.

Based on #1370, but rebased and squased to merge in the changes made to the fan model in the meantime.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

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

@oxan oxan marked this pull request as ready for review January 9, 2022 22:41
@oxan oxan requested a review from OttoWinter as a code owner January 9, 2022 22:41
@probot-esphome
Copy link

probot-esphome bot commented Jan 9, 2022

Hey there @OttoWinter, mind taking a look at this pull request as it has been labeled with an integration (api) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@probot-esphome
Copy link

Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration (output) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@jesserockz jesserockz self-assigned this Jan 23, 2022
ESPHome Dev automation moved this from Needs Review to Reviewer Approved Jan 23, 2022
Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jesserockz jesserockz merged commit 2a84db7 into esphome:dev Jan 23, 2022
ESPHome Dev automation moved this from Reviewer Approved to Done Jan 23, 2022
@oxan oxan deleted the misc/climate-like-fan branch January 23, 2022 14:07
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2022
ESPHome Dev automation moved this from Done to Reviewer Approved Sep 23, 2023
ESPHome Dev automation moved this from Reviewer Approved to Done Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants