8000 Fix update data for multiple Gree devices by filipagh · Pull Request #139469 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix update data for multiple Gree devices #139469

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 1 commit into from
Mar 1, 2025

Conversation

filipagh
Copy link
Contributor
@filipagh filipagh commented Feb 27, 2025

Breaking change

Proposed change

problem

Main problem is if you have multiple devices only 1 device is updated in refresh loop
when update response is process for any device it postpone update for all devices

changes

Do not use explicit update handler for devices status update, internal communication lib (now) do not provide which device is updated
use HA refresh loop to update data of device

copy data object to prevent rewrite data from internal lib and make DataUpdateCoordinator update data only if changed

#128046
#124007


allow more time to process response before log warning about long wait for response and make log message more clear
#131645
#127008


also im new to HA this is my 1. pr
i test it locally with 2 gree AC now they are updated fine, i can change ac with controller or gree app and HA is correctly updated

PS there is another issue KeyError: 'val'
#128046 (comment)

this need to be solved in internal greeclimate project there is PR for it cmroche/greeclimate#110

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)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • 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
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format 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.

To help with the load of incoming pull requests:

do not use handler for explicit update devices as internal communication lib do not provide which device is updated
use ha update loop

copy data object to prevent rewrite data from internal lib

allow more time to process response before log warning about long wait for response and make log message more clear
home-assistant[bot]

This comment was marked as resolved.

@home-assistant
Copy link

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

Code owner commands

Code owners of gree can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign gree Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

Copy link
Member
@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @filipagh 👍

../Frenck

@frenck frenck merged commit 18217a5 into home-assistant:dev Mar 1, 2025
32 checks passed
@filipagh
Copy link
Contributor Author
filipagh commented Mar 1, 2025

thanks @frenck, can you also cherry pick into a point release please

@frenck
Copy link
Member
frenck commented Mar 1, 2025

thanks @frenck, can you also cherry pick into a point release please

There is no point release in this cycle anymore.

We do have a beta running, however, this PR didn't solve any bugs as per pull request description. It only listed affiliation with some of them?

CleanShot 2025-03-01 at 12 24 15@2x

Since the beta is already in freeze, we only pick bug fixes at this point.

../Frenck

@filipagh
Copy link
Contributor Author
filipagh commented Mar 1, 2025

issues are polluted with multiple different issues ... but if i consider only issue autor comment then this PR will fix
#124007
#131645
#127008

and mainly now multiple devices will be correctly updated

@filipagh
Copy link
Contributor Author
filipagh commented Mar 1, 2025

but if this version is in freeze then it will be released soon so i thing we can wait little more :) any way thanks for review

@frenck
Copy link
Member
frenck commented Mar 1, 2025

issues are polluted with multiple different issues ... but if i consider only issue autor comment then this PR will fix #124007 #131645 #127008

and mainly now multiple devices will be correctly updated

Check, ok, will pick to beta.

Thanks for the clarification 👍

../Frenck

@frenck frenck added this to the 2025.3.0 milestone Mar 1, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2025
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.

3 participants
0