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

Improve AtlanticDomesticHotWaterProductionMBLComponent support in Overkiz #114178

Merged
merged 45 commits into from
Jun 27, 2024

Conversation

ALERTua
Copy link
Contributor

@ALERTua ALERTua commented Mar 25, 2024

Proposed change

  • Correctly determines Atlantic Water Heater based on controllable_name rather than just a widget, as the latter does not distinguish the Atlantic Water Heater functions.
  • Correctly selects eco, performance, away, and manual modes for Atlantic Water
  • Adds a number of binary_sensors, sensors, numbers for Atlantic Water Heater entity

The code was tested on Atlantic Steatite Cube WI-FI VM 150 S4CS 2400W.

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.

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:

Adds support of Overkiz water heater entity selection based on device controllable_name
Adds support of Atlantic water heater based on Atlantic Steatite Cube WI-FI VM 150 S4CS 2400W
Adds more Overkiz water heater binary_sensors, numbers, and sensors
Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @ALERTua

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

Hey there @iMicknl, @vlebourl, @tetienne, @nyroDev, @Tronix117, 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.

@ALERTua ALERTua marked this pull request as ready for review March 25, 2024 15:07
@ALERTua ALERTua requested a review from iMicknl as a code owner March 25, 2024 15:07
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.

Thanks a lot for your contribution!

Please include only a single entity change per PR. Would be great if you can split up the binary_sensor, number, sensor and water_heater changes to separate PRs. The smaller PRs should get in fairly easy, the water heater might take a bit more time.

@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.

@home-assistant home-assistant bot marked this pull request as draft March 25, 2024 15:13
@ALERTua
Copy link
Contributor Author

ALERTua commented Mar 25, 2024

Thanks a lot for your contribution!

Please include only a single entity change per PR. Would be great if you can split up the binary_sensor, number, sensor and water_heater changes to separate PRs. The smaller PRs should get in fairly easy, the water heater might take a bit more time.

Done. Preparing separate PRs for binary_sensors, number and sensor

@ALERTua ALERTua marked this pull request as ready for review March 25, 2024 15:19
@home-assistant home-assistant bot requested a review from iMicknl March 25, 2024 15:19
@ALERTua
Copy link
Contributor Author

ALERTua commented Jun 24, 2024

@ALERTua I am actually back and happy to have a look. Would you need these two constants/enums for this PR? I can add them quickly, no worries.

To be clear, we are talking about #114178 (comment) the refreshing of the sensors that do not refresh themselves too much.
I am afraid I need more than just fields in pyoverkiz from you. I need a consultation regarding those refresh rates. If I just add a command call that refreshes the electrical consumption attribute and then a command call to refresh the heating status attribute, I will reach the 429 rate limit exceeded error even faster. I couldn't find a call that forces a refresh of "all" attributes, and, also, if I refresh the electrical consumption attribute right after I switch the operation mode and the heater starts to heat, the attribute still shows zero, so there should at least a one-second pause. I couldn't find any examples of such behavior and thought that this wouldn't be pretty. Can you suggest from your experience, how these matters should be handled?

@sippe2
Copy link

sippe2 commented Jun 26, 2024

Hi @ALERTua ,

I finally managed to test it with my own Atlantic, and actually, the functions seem to work as you described in general.

Modes_are_ok

Same in app and seems to be working ok!

boost

However, I noticed a strange issue in the away mode that seems to cause an odd situation. When I switch from performance mode to away mode, the state information disappears completely or alternatively changes to unknown, and Home Assistant reports an error. The state does indeed change to absence mode in the app, so the away mode works in principle. After a while, the absence mode changed itself back to off mode.

away_mode_bug absence_in_app

I suppose that away mode actually works but there should be different "work mode" or "off state" or "something"...

@ALERTua
Copy link
Contributor Author

ALERTua commented Jun 26, 2024

yeah, about that: while in Away mode, the heater is off, but the entity does not support this state, at least I don't know how I can allow the entity to become OFF without allowing the user to try to switch the heater OFF. I don't see a problem with this, but I will accept any suggestions for improvement.

@sippe2
Copy link

sippe2 commented Jun 26, 2024

yeah, about that: while in Away mode, the heater is off, but the entity does not support this state, at least I don't know how I can allow the entity to become OFF without allowing the user to try to switch the heater OFF. I don't see a problem with this, but I will accept any suggestions for improvement.

@ALERTua , I'm quite sure that with your experience with Atlantic, this puzzle will be solved sooner or later. :-)

@sippe2
Copy link

sippe2 commented Jun 26, 2024

Hi @iMicknl ,

I can confirm that the code works on my device as ALERTua described.

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! Minor remark, would be good if the file name and class name match.
Afterwards fine to merge!

@ALERTua ALERTua marked this pull request as ready for review June 26, 2024 15:10
@home-assistant home-assistant bot requested a review from iMicknl June 26, 2024 15:10
@iMicknl iMicknl added this to the 2024.7.0 milestone Jun 26, 2024
@iMicknl iMicknl merged commit 195643d into home-assistant:dev Jun 27, 2024
25 checks passed
frenck pushed a commit that referenced this pull request Jun 27, 2024
…rkiz (#114178)

* add overkiz AtlanticDHW support

Adds support of Overkiz water heater entity selection based on device controllable_name
Adds support of Atlantic water heater based on Atlantic Steatite Cube WI-FI VM 150 S4CS 2400W
Adds more Overkiz water heater binary_sensors, numbers, and sensors

* Changed class annotation

* min_temp and max_temp as properties

* reverted binary_sensors, number, sensor to make separate PRs

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_dhw.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_dhw.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_dhw.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/overkiz/water_heater.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_dhw.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_dhw.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* review fixes, typos, and pylint

* review fix

* review fix

* ruff

* temperature properties changed to constructor attributes

* logger removed

* constants usage consistency

* redundant mapping removed

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_dhw.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* boost mode method annotation typo

* removed away mode for atlantic dwh

* absence and boost mode attributes now support 'prog' state

* heating status bugfix

* electrical consumption sensor

* warm water remaining volume sensor

* away mode reintroduced

* mypy check

* boost plus state support

* Update homeassistant/components/overkiz/sensor.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* sensors reverted to separate them into their own PR

* check away and boost modes on before switching them off

* atlantic_dhw renamed to atlantic_domestic_hot_water_production

* annotation changed

* AtlanticDomesticHotWaterProductionMBLComponent file renamed, annotation change reverted

---------

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2024
@ALERTua ALERTua deleted the atlantic_dhw branch July 3, 2024 18:44
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 comments in a new PR. Thanks!

@home-assistant home-assistant unlocked this conversation Aug 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 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.

Overkiz: Atlantic Domestic Hot Water Operating Mode issue
7 participants