feat: add manual E-Heater assist switch (R4) and refine sterilize profile mapping - #29
Conversation
ad7c991 to
1dfaa51
Compare
1dfaa51 to
857abaf
Compare
|
Sorry mate, using gemini flash for this and it's a bit trigger happy. I didnt see your fix in the last one but went through everything and noticed the hardcoded registers too. I also added a power off function to disable the E-heater, as it latches until the setpoint is reached otherwise. |
Is it ready to check? |
|
Reviewed the latest commit (
One issue remains, and one behavior worth double-checking before merge: 1.
|
…t pattern
Unconditional .get("sterilize", 3) would silently force-create a Sanitize
switch on profiles that never declared the register (e.g. midea_170l.json),
writing to an unvalidated register 3 — same class of bug fixed earlier for
heater_assist_trigger_register.
Consistent with the conditional pattern already used directly below for
heater_assist_register, sanitize_state_register, and
heater_assist_trigger_register. ecospring_hp300.json already declares
"sterilize": 3 so EcoSpring installs are unaffected.
|
Thanks for the thorough review — both points are valid. 1. if "sterilize" in registers:
config["sterilize_register"] = registers["sterilize"]
2. Agreed it is a larger side effect than the entity name implies. Tested it in HA — the unit came back cleanly after the reset. Happy to add a more explicit description or entity name if you want to signal the behaviour to users (e.g. "Manual E-Heater Boost" with a note in the entity description). Open to your preference on that before merge. |
|
Full re-check of the branch tip:
No naming preference on the "Manual Heater Assist" entity / power-cycle behavior from our end — that's your call. Good to merge as-is. |
Manual E-Heater assist switch, Sanitize Cycle Scheduled sensor, and refined R108/R109 decoding from PR #29. Released as a pre-release pending further live end-to-end validation on EcoSpring HP300. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary of Changes
Resolves #25 by adding support for triggering the manual E-Heater booster element and refining register profile mappings for EcoSpring / Chromagen / Midea HWS units.
1. Manual E-Heater Assist Trigger (Register 4)
1to Register 4 triggers the manual E-Heater element.MideaHeaterAssistSwitch(Manual Heater Assist) linked to Register 4.power_state = False->power_state = True) inasync_turn_off()so toggling the switch OFF in Home Assistant clears Register 4 on the hardware.2. Profile Register Mapping Fix
profile_manager.pyFix: Addedconfig["sterilize_register"] = registers.get("sterilize", 3)inapply_profile_to_config()so device profiles (likeecospring_hp300.json) cleanly mapsterilize_registerinto Home Assistant without needing global fallbacks incoordinator.py.