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

Add support for multiple mbus devices in dsmr #84097

Merged
merged 9 commits into from Nov 29, 2023

Conversation

dupondje
Copy link
Contributor

@dupondje dupondje commented Dec 16, 2022

Breaking change

For users using the 5B version:
The previous gas sensor (Gas consumption) will change to Gas consumption mbusX.
Also multiple gas sensors will be possible.

Proposed change

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
  • The code has been formatted using Black (black --fast 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 @RobBie1221, @frenck, mind taking a look at this pull request as it has been labeled with an integration (dsmr) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of dsmr can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign dsmr Removes the current integration label and assignees on the issue, add the integration domain after the command.

frenck
frenck previously requested changes Dec 29, 2022
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.

Please make sure CI passes.

@smignon612

This comment was marked as off-topic.

@dupondje

This comment was marked as outdated.

@timvdsm

This comment was marked as off-topic.

@dupondje dupondje force-pushed the add_dsmr_peak branch 2 times, most recently from 72c8244 to a8f4fe7 Compare January 23, 2023 12:22
@dupondje
Copy link
Contributor Author

@frenck : CI passes and branch updated to latest dev.
Also did some other improvements to the code, see the additional commits.

Its running fine here on my own HA.

I hope this can get merged before the 2023.2.0 release as this is a hot-topic in Belgium and a lot of people will find this very useful!

@dupondje dupondje marked this pull request as ready for review November 28, 2023 10:57
Copy link
Contributor

@jbouwh jbouwh left a comment

Choose a reason for hiding this comment

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

Left some comments.
May be we should also migrate the DSMR 5 gas meter to an MBUS entity in a follow up PR
Further I think we should no longer add the devices during the config flow, but add them dynamically instead and notify the user that any device will be detected automatically.

homeassistant/components/dsmr/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/dsmr/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/dsmr/sensor.py Show resolved Hide resolved
homeassistant/components/dsmr/sensor.py Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft November 29, 2023 09:42
@dupondje dupondje marked this pull request as ready for review November 29, 2023 12:57
@home-assistant home-assistant bot requested a review from jbouwh November 29, 2023 12:57
homeassistant/components/dsmr/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/dsmr/sensor.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jbouwh jbouwh left a comment

Choose a reason for hiding this comment

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

Very nice!

Thnx @dupondje 👍

Only thing that is needed is a DOC's PR to mention the water meter capabilities etc

@jbouwh
Copy link
Contributor

jbouwh commented Nov 29, 2023

CI fails on unrelated code

@jbouwh
Copy link
Contributor

jbouwh commented Nov 29, 2023

@frenck Do you approve as code owner?

@jbouwh jbouwh dismissed frenck’s stale review November 29, 2023 14:34

CI tests pass, comments adressed

@jbouwh jbouwh merged commit ba48100 into home-assistant:dev Nov 29, 2023
22 of 23 checks passed
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Please address the comment in a new PR. Thanks!

homeassistant/components/dsmr/sensor.py Show resolved Hide resolved
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2023
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