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

Fix Acmeda integration #124960

Draft
wants to merge 19 commits into
base: dev
Choose a base branch
from
Draft

Fix Acmeda integration #124960

wants to merge 19 commits into from

Conversation

atmurray
Copy link
Contributor

@atmurray atmurray commented Aug 31, 2024

Breaking change

Proposed change

As part of homeassistant code refactoring changes were made to the acmeda integration that broke the integration when discovering new hubs. This pull request fixes the discovery of hubs and other reported defects:

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:

Resolve issue home-assistant#123509 due to calls to async_write_ha_state from a thread other than the event loop
Bump aiopulse version to 0.4.6 to fix issues with hub timers as well as unicode characters in strings.
Convert unique_id to string
Revert changes to config_flow that broke hub discovery.
Updated aiopulse to 0.4.6 from 0.4.4
Resolved ruff issue with PERF401
Removed unused type: ignore comment
Pretty manifest.json
@joostlek
Copy link
Member

Can we try splitting some bug fixes in different PRs? Haven't read the code yet, but having a non string unique id usually requires a migration

This reverts commit 68f52ea.
@atmurray
Copy link
Contributor Author

Done, reverted changes to unique_id

@joostlek
Copy link
Member

Awesome, can we also do the bump in a separate PR? :)

@atmurray
Copy link
Contributor Author

Done

@atmurray atmurray marked this pull request as ready for review August 31, 2024 08:50
@MartinHjelmare MartinHjelmare changed the title Critical fixes to Acmeda integration Fix Acmeda integration Aug 31, 2024
@joostlek
Copy link
Member

joostlek commented Sep 2, 2024

I think the comments from bdraco mean that we should refactor the library to remove the extra async loop stuff and because the library is async we don't have to worry about running non-async code

@atmurray
Copy link
Contributor Author

atmurray commented Sep 8, 2024

Have reverted the change to the notification callback and submitted a pull request to resolve that separate issue:
#125483

@frenck frenck modified the milestones: 2024.9.2, 2024.6.0 Sep 16, 2024
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.

There is an merge conflict, could you take a look?

..?Frenck

@home-assistant home-assistant bot marked this pull request as draft September 16, 2024 13:38
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants