Skip to content

feat: add manual E-Heater assist switch (R4) and refine sanitize binary sensors - #28

Closed
tazomatalax wants to merge 6 commits into
0xAHA:mainfrom
tazomatalax:feat/e-heater-support
Closed

feat: add manual E-Heater assist switch (R4) and refine sanitize binary sensors#28
tazomatalax wants to merge 6 commits into
0xAHA:mainfrom
tazomatalax:feat/e-heater-support

Conversation

@tazomatalax

Copy link
Copy Markdown
Contributor

Summary of Changes

Resolves #25 by adding support for triggering the manual E-Heater booster element and refining diagnostic binary sensors for EcoSpring / Chromagen / Midea HWS units.

1. Manual E-Heater Assist Trigger (Register 4)

  • Writable Control: Proven via direct Modbus TCP testing that writing 1 to Register 4 triggers the manual E-Heater element.
  • Switch Entity: Added MideaHeaterAssistSwitch (Manual Heater Assist) linked to Register 4.
  • Self-Clearing Behavior: Writing 0 is rejected with Modbus Exception Code 3 (Illegal Data Value), operating identically to the Sanitize register (R3). It automatically self-clears back to 0 when target setpoint temperature is met.

2. Refined Diagnostic Binary Sensors

  • Electric Booster Active: Filtered Register 108 using v & 8 (Bit 3 active when the booster element relay is energised). This prevents standby values like 2 (delayed sanitize) from falsely showing the booster element as running.
  • Sanitize State Split (Register 109): Split Register 109 into two distinct binary entities:
    • Sanitize Cycle Active: Triggers when R109 = 32 (immediate/active disinfection).
    • Sanitize Cycle Scheduled: Triggers when R109 = 33 (scheduled/pending weekly disinfection).

3. Model Configuration Updates

  • Added "heater_assist_trigger_register": 4 to ecospring_hp300.json.

Note: Opened as a Draft PR while final live end-to-end testing is conducted.

tazomatalax and others added 5 commits July 31, 2026 15:28
…rdcoded default

heater_assist_trigger_register defaulted to register 4 in the coordinator
whenever a profile didn't set it, and apply_profile_to_config() never
copied the key out of a profile's registers block at all - so the new
switch was being created on every install regardless of profile, including
models where register 4 has never been validated.

- coordinator.py: drop the hardcoded `4` fallback, matching every other
  optional diagnostic register (defaults to None)
- profile_manager.py: wire heater_assist_trigger_register through
  apply_profile_to_config() and save_profile(), same as
  heater_assist_register/sanitize_state_register
- switch.py: require both heater_assist_trigger_register and
  heater_assist_register before creating the switch, since it's the
  write-side of a state R108 reports
- binary_sensor.py: keep the original unique_id suffixes for the two
  pre-existing sensors so current EcoSpring installs don't get orphaned
  entities from the R108/R109 refinements in this PR

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tazomatalax
tazomatalax force-pushed the feat/e-heater-support branch 2 times, most recently from 8e35947 to 2586b82 Compare July 31, 2026 08:46
@tazomatalax
tazomatalax force-pushed the feat/e-heater-support branch from 2586b82 to 4d5546d Compare July 31, 2026 08:49
@tazomatalax
tazomatalax deleted the feat/e-heater-support branch July 31, 2026 08:51
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.

📋 Device Profile Submission

2 participants