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 AtlanticDomesticHotWaterProductionV2IOComponent #139524

Conversation

ALERTua
Copy link
Contributor

@ALERTua ALERTua commented Feb 28, 2025

Breaking change

Proposed change

Add support for AtlanticDomesticHotWaterProductionV2IOComponent, which is Atlantic Explorer V4.
The discussion originated here
The changes are based on a few days of collaboration with @PvaI and are based on their diagnostics data
@PvaI comment for this PR with the testing data: #139524 (comment) #139524 (comment)

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.

Roadmap

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:

@home-assistant
Copy link

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

Code owner commands

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

return True

# operating_mode can be a dict or a Literal[DHWP_AWAY_MODES]
operating_mode = self.executor.select_state(OverkizState.CORE_OPERATING_MODE)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

borrowed from domestic_hot_water_production.py

@PvaI
Copy link

PvaI commented Mar 4, 2025

I requested support for the Atlantic Explorer V4 heat pump water heater in the Overkiz core component.
I have been using the ha-tahoma integration, but that integration is being retired in favour of the core integration. However the core integration did not allow me to control the device and showed the device as being off.
I've worked with ALERTua to determine the various modes the device supports through pyoverkiz and verified every operation in HA with the states reported using the Python client for OverKiz API (pyoverkiz), the Cozytouch app and the control panel on the device itself. And vice versa, to verify changes made in the app, on the device and using pyoverkiz were shown in HA correctly.
image

The device has two main operation states: Auto mode and Manual mode. In Auto mode the device analyses hot water consumption of the previous days to adapt hot water production to the actual needs. The target temperature will be automatically adjusted between 50 and 62° C, and the device will favour the heat pump to produce hot water, but may also selected the electrical backup to ensure sufficient hot water volume. As we lack a state Auto, I've suggested we use state performance for this mode, as the device aims to optimally provide the requested hot water volume.

In manual mode, the device doesn't analyse previous consumption and triggers a heating cycle when a minimal water temperature is reached (I'm assuming this is core:MinimalTemperatureManualModeState but this isn't available in overkiz for my device)
There are two more modes in manual mode; eco and boost. In eco mode the device will lower the maximum water temperature to 55° C. In boost mode in which the device will also use the electrical heating to reach the target temperature. We defined Eco as State Eco and as the device is predominantly using electrical coils to heat water in boost mode, State Electric. Which leaves normal manual mode defined as state heat pump.

The device also supports an away mode, with the option of setting it for a time period with a start and end date or a more permanent setting where it's set either on or off. We don't currently have the option of defining the duration of away mode, so this setting is currently acting like an on / off switch.

I've added two states in my integration to monitor power consumption of the device:

    OverkizSensorDescription(
        key=OverkizState.IO_POWER_HEAT_ELECTRICAL,
        name="Electric coil power consumption",
        device_class=SensorDeviceClass.POWER,
        native_unit_of_measurement=UnitOfPower.WATT,
        state_class=SensorStateClass.MEASUREMENT,
    ),
    OverkizSensorDescription(
        key=OverkizState.IO_POWER_HEAT_PUMP,
        name="Heat pump power consumption",
        device_class=SensorDeviceClass.POWER,
        native_unit_of_measurement=UnitOfPower.WATT,
        state_class=SensorStateClass.MEASUREMENT,
    ),

I'm looking at the remaining states that are currently not reported, e.g. the core:MinimalTemperatureManualModeState mentioned above, to determine which show meaningful data and I'll open a PR to get those included once I finish.

An example of the mode correctly shown on HA, app and device:
image
image

@PvaI
Copy link

PvaI commented Mar 6, 2025

Update after running this code for 4 days: I've not encountered any issues. I'm able to control my device manually and by automations based on dynamic energy prices and current / expected PV yield. As far as I'm concerned this PR is complete.

@ALERTua ALERTua marked this pull request as ready for review March 6, 2025 09:16
@ALERTua ALERTua requested a review from iMicknl as a code owner March 6, 2025 09:16
Copy link
Contributor

@iMicknl iMicknl left a comment

Choose a reason for hiding this comment

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

Some quick comments. Will need to have a closer look soon.

@iMicknl iMicknl requested a review from Copilot March 14, 2025 13:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for a new water heater component, AtlanticDomesticHotWaterProductionV2IOComponent, to enable integration with Atlantic Explorer V4 devices.

  • Added a new component file to handle IO functionality for AtlanticDomesticHotWaterProductionV2.
  • Updated the water heater integration’s mapping in init.py to include the new IO component.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
homeassistant/components/overkiz/water_heater/atlantic_domestic_hot_water_production_v2_io_component.py New component implementing water heater capabilities for AtlanticDomesticHotWaterProductionV2 IO devices.
homeassistant/components/overkiz/water_heater/init.py Updated integration mapping to support the new IO component.
Comments suppressed due to low confidence (2)

homeassistant/components/overkiz/water_heater/atlantic_domestic_hot_water_production_v2_io_component.py:107

  • The method name 'is_state_perfomance' appears to be misspelled; consider renaming it to 'is_state_performance' for clarity and consistency.
def is_state_perfomance(self) -> bool:

homeassistant/components/overkiz/water_heater/atlantic_domestic_hot_water_production_v2_io_component.py:1

  • There are no tests included to verify the functionality of this new component. Please add appropriate tests to ensure its correct behavior in production.
"""Support for AtlanticDomesticHotWaterProductionV2IOComponent."""

Copy link
Contributor

@iMicknl iMicknl left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@iMicknl iMicknl merged commit 25a36c1 into home-assistant:dev Mar 25, 2025
32 of 34 checks passed
@iMicknl iMicknl added this to the 2025.4.0b0 milestone Mar 25, 2025
@frenck frenck removed this from the 2025.4.0b0 milestone Mar 26, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2025
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