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

Move elmax coordinator to separate module #117425

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

epenet
Copy link
Contributor

@epenet epenet commented May 14, 2024

Proposed change

SSIA, linked to #108174

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

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

Code owner commands

Code owners of elmax 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 elmax 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.

@frenck
Copy link
Member

frenck commented May 14, 2024

untested

Why keep making untested PRs?
Is this move needed for something that we go the untested route?

../Frenck

@epenet
Copy link
Contributor Author

epenet commented May 14, 2024

untested

Why keep making untested PRs? Is this move needed for something that we go the untested route?

../Frenck

IMO, the change is very low risk, and gets rid of pylint warnings.
I marked it as untested to encourage the code-owners to confirm.

@epenet
Copy link
Contributor Author

epenet commented May 14, 2024

With the low coverage on this integration, I have marked it as draft until hopefully @albertogeniola can confirm it is working as expected.

@epenet epenet marked this pull request as draft May 14, 2024 12:22
@frenck

This comment was marked as resolved.

@epenet epenet mentioned this pull request May 17, 2024
20 tasks
@epenet
Copy link
Contributor Author

epenet commented May 17, 2024

@frenck: tests added in #117637

@epenet
Copy link
Contributor Author

epenet commented May 17, 2024

Rebased to fix conflicts.
Tests added in #117637
Coverage not perfect, but at 70% hopefully it is sufficient.

---------- coverage: platform linux, python 3.12.3-final-0 -----------
Name                                                    Stmts   Miss  Cover   Missing
-------------------------------------------------------------------------------------
homeassistant/components/elmax/__init__.py                 51     11    78%   61-69, 77-86, 93-94, 122
homeassistant/components/elmax/alarm_control_panel.py      46     11    76%   38, 72-82, 87-94, 99-102
homeassistant/components/elmax/binary_sensor.py            33      2    94%   33, 40
homeassistant/components/elmax/common.py                   37      0   100%
homeassistant/components/elmax/config_flow.py             206      0   100%
homeassistant/components/elmax/const.py                    25      0   100%
homeassistant/components/elmax/coordinator.py              64     19    70%   59, 65, 69-71, 77, 87, 102-120
homeassistant/components/elmax/cover.py                    62     12    81%   38, 44, 51, 82, 112-122, 126, 132
homeassistant/components/elmax/switch.py                   54     17    69%   35, 42, 72-88, 92-96, 100-104
-------------------------------------------------------------------------------------
TOTAL                                                     578     72    88%

@epenet epenet marked this pull request as ready for review May 17, 2024 14:01
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, @epenet 👍

../Frenck

@frenck frenck merged commit a29a0a3 into home-assistant:dev May 17, 2024
19 of 20 checks passed
@epenet epenet deleted the 20240514-1332 branch May 17, 2024 14:02
@albertogeniola
Copy link
Contributor

Hi all,
Just to be 100% sure there was no impact on current integration, I've tested the DEV branch (which has already been merged with this PR) with a real panel and works.
Thanks you all for the great work!

@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2024
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.

None yet

3 participants