forked from vlebourl/custom_vesync
-
Notifications
You must be signed in to change notification settings - Fork 12
Fix to Fan TURN_ON and TURN_OFF features required for HA 2025.1 (and fix merge issues) #35
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
25457da
Merge pull request #1 from fcastilloec/async
elarsson1 ffa37d3
Fix Fan TURN_ON and TURN_OFF features for HA 2025.1
elarsson1 7901fc1
Merge branch 'main' into elarsson1-fix-fanentityfeatures
gdgib b79a69a
Merge branch 'main' into elarsson1-fix-fanentityfeatures
gdgib 1953e88
Fix merge breakages & lint issues
gdgib 542883b
Whitespace lint failure
gdgib File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is undoing the fixes from #32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite, and I'm definitely not sure I've got the logic right between all the merges, so bear with me for a moment.
If you look at #32, the
platforms_listwas never populated in the code you were fixing. This fork already had code to populate theplatforms_listfromPLATFORMS.keys()after filtering through thedevice_dict. Take a careful read through and let me know if you still think I've got it wrong. I'm going to run some quick tests, and then re-review this.Oh, and I agree I really should have made a separate PR in a better world.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key is that my fork had
platforms_list.append(p)(see https://github.com/haext/custom_vesync/blob/main/custom_components/vesync/__init__.py#L93) already, which solved SOME of the problem you were fixing. I had to deal with the mismatch while resolving merge conflicts, which is how I got a bit turned around and why this change ended up in this PR.Anyway, I think the logic is correct now. The only difference between my code and what you wrote in that my code won't setup platforms which were excluded from the output of
async_process_devices(see https://github.com/haext/custom_vesync/blob/main/custom_components/vesync/common.py#L34), which I think is actually slightly more correct.As I mentioned I ABSOLUTELY could be wrong about this, so don't feel shy about pointing out anything I missed, or opening a PR that you think is necessary to correct things.