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 Landis+Gyr MWh-readings from ultraheat-api #89937

Merged
merged 4 commits into from Mar 30, 2023

Conversation

vpathuis
Copy link
Contributor

Proposed change

This change adds support for the T550 model by reading MWh-values whenever supplied by the ultraheat-api.

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

@vpathuis vpathuis changed the title Add Landis+Gyr MWh-readings from ultraheat-api and support T550 Add Landis+Gyr MWh-readings from ultraheat-api Mar 19, 2023
@home-assistant home-assistant bot marked this pull request as draft March 22, 2023 07:57
@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.

@vpathuis vpathuis mentioned this pull request Mar 22, 2023
20 tasks
Remove manifest cleanup from PR

Remove added device class from this PR

Restore entity registry fixture

Replace filter by attr_entity_registry_enabled_default
@vpathuis vpathuis marked this pull request as ready for review March 23, 2023 17:13
@home-assistant home-assistant bot requested a review from epenet March 23, 2023 17:13
@Kugelfang666
Copy link

It's great to seeing this progress but apparently this PR isn't merged jet. does that imply that the T550 model will not be supported with the next release of HA?

@epenet epenet added the smash Indicator this PR is close to finish for merging or closing label Mar 30, 2023
Copy link
Contributor

@epenet epenet left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@epenet
Copy link
Contributor

epenet commented Mar 30, 2023

It's great to seeing this progress but apparently this PR isn't merged jet. does that imply that the T550 model will not be supported with the next release of HA?

The merge window for Home Assistant core 2023.4 closed just yesterday, so this will be included in Home Assistant core 2023.5

@epenet epenet merged commit a7040a0 into home-assistant:dev Mar 30, 2023
22 checks passed
native_unit_of_measurement=UnitOfEnergy.MEGA_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
value_fn=lambda res: getattr(res, "heat_usage_mwh", None),
Copy link
Contributor

@epenet epenet Mar 30, 2023

Choose a reason for hiding this comment

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

In a follow-up PR, I think you should remove all the getattr.

value_fn=lambda res: res.heat_usage_mwh,
value_fn=lambda res: res.volume_usage_m3,
...
value_fn=lambda res: res.settings_and_firmware,

@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2023
@vpathuis vpathuis deleted the support-mwh branch April 1, 2023 12:39
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