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

Plugwise: add support for 3-phase DSMR's #85421

Merged
merged 4 commits into from
Jan 8, 2023
Merged

Conversation

bouwew
Copy link
Contributor

@bouwew bouwew commented Jan 8, 2023

Plugwise Smile P1: add support for 3-phase DSMR's, via plugwise v0.27.0
https://github.com/plugwise/python-plugwise/releases/tag/v0.27.0
plugwise/python-plugwise@v0.25.14...v0.27.0

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

  • 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
  • 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

home-assistant bot commented Jan 8, 2023

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

Code owner commands

Code owners of plugwise 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 plugwise Removes the current integration label and assignees on the issue, add the integration domain after the command.

Copy link
Contributor

@elupus elupus left a comment

Choose a reason for hiding this comment

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

LGTM

@elupus elupus merged commit 5eb7aed into home-assistant:dev Jan 8, 2023
Comment on lines +265 to +285
SensorEntityDescription(
key="voltage_phase_one",
name="Voltage phase one",
device_class=SensorDeviceClass.VOLTAGE,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="voltage_phase_two",
name="Voltage phase two",
device_class=SensorDeviceClass.VOLTAGE,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="voltage_phase_three",
name="Voltage phase three",
device_class=SensorDeviceClass.VOLTAGE,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
),
Copy link
Member

@frenck frenck Jan 8, 2023

Choose a reason for hiding this comment

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

Please address this comment in a new PR.

Voltage sensors should be disabled by default, as per developer documentation:

CleanShot 2023-01-08 at 17 26 32@2x

Ref: https://developers.home-assistant.io/docs/core/entity

Voltage is really uncommon to be generally used.

/CC: @elupus

Copy link
Contributor

@elupus elupus Jan 8, 2023

Choose a reason for hiding this comment

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

This is not battery voltage?

Ps. But I can sort of accept that it should be disabled by default since its rather not much use to know mains voltage.

Copy link
Contributor

Choose a reason for hiding this comment

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

Frenck is right, this is line voltage of the invididual line phase leads

Copy link
Contributor

Choose a reason for hiding this comment

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

i.e. The P1 is used for DSMR monitoring of gas / electricity (not to confuse with the climate parts)

Copy link
Member

Choose a reason for hiding this comment

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

This is not battery voltage?

Ps. But I can sort of accept that it should be disabled by default since its rather not much use to know mains voltage.

Yeah, the example is a battery, but the general consensus in that example applies. Voltage is really rare to use, but it fluctuates a lot (thus causing lots of data recording, mostly unneeded).

@bouwew bouwew deleted the pw_0_27_0 branch January 8, 2023 17:18
tronikos pushed a commit to tronikos/home-assistant-core that referenced this pull request Jan 9, 2023
* Bump plugwise to v0.27.0

* Add p1-3phase test-fixture

* Add the new 3ph P1 DSMR sensors

* Add p1 3ph test-case
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 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.

4 participants