Skip to content

Release v5.6.0-beta - #41

Merged
tis24dev merged 8 commits into
mainfrom
dev
Jun 29, 2026
Merged

Release v5.6.0-beta#41
tis24dev merged 8 commits into
mainfrom
dev

Conversation

@tis24dev

@tis24dev tis24dev commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Automated release PR for v5.6.0-beta.

Summary by CodeRabbit

  • New Features

    • Added a new fridge/cooling program selector with live program options and an off state.
    • Expanded language support for the new selector in English and Italian.
    • Updated the project header with sponsor and donation badges.
  • Bug Fixes

    • Improved device command handling so program changes are sent reliably and reflect the latest available options.
  • Documentation

    • Added more real-hardware examples to the supported devices list.

Greptile Summary

This PR prepares the v5.6.0-beta release with a new fridge program selector. The main changes are:

  • New REF/FR/FRE program select with immediate start and stop commands.
  • Swap-aware program sending and rollback handling.
  • English and Italian labels for the new select states.
  • Tests for fridge program options, send behavior, and translations.
  • Version, README, and sensor metadata updates.

Confidence Score: 4/5

This is close, but the fridge preset state issue should be fixed before merging.

  • REF presets can still read back as off after a successful selection.
  • The new read-back path depends on string feedback that real REF schemas may not provide.
  • The send and rollback path itself looks contained.

custom_components/addhon/select.py

Important Files Changed

Filename Overview
custom_components/addhon/select.py Adds the REF program select, but preset read-back can still fall through to off when refreshed feedback has no matchable string program code.
custom_components/addhon/program_options.py Adds swap-aware program sending with rollback for fridge program changes.
tests/test_ref_program_select.py Adds coverage for the new REF select, including options, sends, rollback, and translated state labels.

Fix All in Claude Code Fix All in Cursor Fix All in Codex

Reviews (3): Last reviewed commit: "Reflect active fridge program from cloud..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

telard-pixel and others added 5 commits June 28, 2026 23:41
HonMeanWaterConsumption declared device_class=WATER together with
state_class=MEASUREMENT, a combination Home Assistant rejects: WATER (like
VOLUME) only permits total / total_increasing. HA logged on startup:

  Entity sensor.<name>_consumo_idrico_medio (HonMeanWaterConsumption) is
  using state class 'measurement' which is impossible considering device
  class ('water'); expected None or one of 'total_increasing', 'total'

The sensor is an average litres-per-cycle figure (totalWater / (cycles - 1))
that rises and falls, so MEASUREMENT is the correct state_class: it records
min/mean/max long-term statistics. The only volume-family device_class that
allows MEASUREMENT is VOLUME_STORAGE, which means "amount currently stored in
a container" -- wrong for a per-cycle average. Dropping device_class keeps the
litre unit and the statistics while staying semantically honest; the entity
already sets a custom icon (mdi:water-sync), so there is no visual change and
the entity_id / unique_id are untouched (no history or statistics reset).

Verified against homeassistant/components/sensor/const.py
(DEVICE_CLASS_STATE_CLASSES) on HA 2026.6.4.
Added additional tested appliances to the README.
Fridge "modes" (super cool, super freeze, holiday, iot_* presets) are
startProgram/stopProgram PROGRAMS, not writable settings booleans, so they
were exposed only as read-only binary_sensors with no way to change them.

Add HonRefProgramSelect: a single capability-gated select per fridge whose
options are `off` plus the device's live startProgram.program enum. Selecting
a program sends startProgram(program=X) immediately (swap-aware, no washer-style
buffer/Start-button cycle); `off` sends stopProgram (the global mode reset).
current_option is derived from the live device mode flags (quickModeZ1 ->
super_cool, quickModeZ2 -> super_freeze, holidayMode -> holiday, intelligenceMode
-> auto_set), double-gated on the live enum, never from startProgram.program
(which only carries the recovered default category).

The option source and the send target are both resolved specifically from
startProgram so they cannot diverge. New async_send_program helper mirrors the
proven washer swap-and-send flow. Bilingual en/it state labels for the known
fridge program superset. Validated against roberglezz's live REF schema
(HCW58F18EWMP) from the discussion #40 diagnostics.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Comment thread custom_components/addhon/select.py
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tis24dev

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@custom_components/addhon/program_options.py`:
- Around line 82-104: The startProgram send path mutates the active command and
may swap appliance.commands["startProgram"] before send(), but it does not
restore the original state if await command.send() fails. Update the
startProgram handling in program_options.py to mirror the rollback behavior used
by async_send_command: keep the previous command/category state, and on any send
exception restore the original command object and program selection so select.py
and later interactions don’t keep the unsent local mutation. Use the
startProgram command flow, the refreshed lookup, and the PROGRAM_PARAM_NAMES
handling as the main points to hook the rollback into.

In `@README.md`:
- Around line 15-16: The Buy Me a Coffee badge in README.md is pointing to the
GitHub Sponsors URL instead of a Buy Me a Coffee destination. Update the link
target for the markdown badge so it matches the label, or rename the badge to
Sponsor if the GitHub Sponsors URL is the intended destination. Use the badge
markdown near the existing Sponsor and Buy Me a Coffee entries to locate the
change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4c585682-b09b-4983-90e0-98f9958723d9

📥 Commits

Reviewing files that changed from the base of the PR and between aaae337 and f4e06a5.

📒 Files selected for processing (9)
  • README.md
  • custom_components/addhon/manifest.json
  • custom_components/addhon/program_options.py
  • custom_components/addhon/select.py
  • custom_components/addhon/sensor.py
  • custom_components/addhon/translations/en.json
  • custom_components/addhon/translations/it.json
  • tests/test_entity_translation_keys.py
  • tests/test_ref_program_select.py

Comment thread custom_components/addhon/program_options.py Outdated
Comment thread README.md Outdated
@tis24dev

Copy link
Copy Markdown
Owner Author

@coderabbitai help

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai rate limit to show your current review rate limit status.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
  • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
  • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai emit path instructions to emit generated path-specific review instructions for this repository.
  • @coderabbitai resolve merge conflict to automatically resolve merge conflicts.
  • @coderabbitai autofix to automatically fix issues identified in unresolved review comments.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@tis24dev

Copy link
Copy Markdown
Owner Author

@coderabbitai summary

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
✅ Action performed

Summary regeneration triggered.

Removed 'Buy Me a Coffee' badge from README.
Comment thread custom_components/addhon/select.py
tis24dev added 2 commits June 29, 2026 14:08
Address CodeRabbit review (PR #41): async_send_program mutated the program
parameter and swapped appliance.commands["startProgram"] to the selected
category before send(), with no rollback. Since the REF select skips the
coordinator refresh on a failed send, a rejected command left a local
command/category the cloud never accepted in place until the next poll.

Mirror async_send_command's rollback: snapshot the pre-swap parameter state and,
on any send exception, restore it and reset the swapped command pointer to the
original, then re-raise. Add a mutation-proof test asserting both the command
pointer and the program value are reverted (and no refresh runs) on failure.
The REF program select read current_option only from the four mode flags
(quickModeZ1/Z2, holidayMode, intelligenceMode), so the iot_* download presets
(which set no flag) always read back as "off" after being applied, making the
control look like the command was ignored.

The cloud persists the active program in programName/prStr/prCode (the field the
official app reads to show the running program, e.g. after an app reinstall).
Extend current_option to consult it after the flags: match it (whole token and
last dotted i18n-key segment, case-insensitively, exact only - no fuzzy match)
against the offered option codes, else off. startProgram.program is still never
used (it is only the recovered default category). This is real device feedback,
not optimistic "remember what was clicked" state. The exact programName format
for an active iot_* preset is to be confirmed against a live dump.
recovered default category, not the running program)."""
by_lower = {code.lower(): code for code in self._program_codes}
for attr in self._REF_ACTIVE_PROGRAM_ATTRS:
raw = self._get_attr(attr)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Preset Still Reads Off

This fallback still misses REF presets when the refreshed device state does not contain a string program code. For real REF schemas where programName is computed as No Program, prStr is absent, and prCode is numeric, selecting an offered preset such as iot_extra_cold can send successfully and refresh, but _active_program_code() cannot match any of these fields back to the offered option. The entity then falls through to off, so Home Assistant can still report the preset as not applied after a successful selection.

Fix in Claude Code Fix in Cursor Fix in Codex

@tis24dev
tis24dev merged commit 8e5f154 into main Jun 29, 2026
9 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 30, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants