Skip to content

Release 26.3.2.1 - CPAP/Tank Refill Mode, new sensors, and ESPHome modernisation#35

Open
bharvey88 wants to merge 31 commits intomainfrom
beta
Open

Release 26.3.2.1 - CPAP/Tank Refill Mode, new sensors, and ESPHome modernisation#35
bharvey88 wants to merge 31 commits intomainfrom
beta

Conversation

@bharvey88
Copy link
Copy Markdown
Contributor

Version: 26.3.2.1

What does this implement/fix?

Merges beta into main for the 26.3.2.1 release. Changes include:

  • Tank Refill Mode (formerly Invert Water Logic) — flips input sensor meaning so DRY = destination low = start pump, WET = destination full = stop pump; auto-configures related switches on toggle and on boot restore
  • Auto Refill — automatically triggers pumpUntilFull when input sensor goes dry in Tank Refill Mode; auto-toggles with Tank Refill Mode
  • Last Pump Action text sensor — surfaces pump events (Auto Refill Triggered, Pump Started, Pump Stopped) as readable entries in the HA logbook
  • ESPHome modernisation — web server v3, remove redundant board string (variant + flash_size already present), remove legacy platformio options and BLE wifi hooks (breaking: board spec change)
  • IP address text sensor — via wifi_info platform
  • ESPHome version + Apollo firmware version text sensors
  • Bug fixes — Apollo firmware version showing "unknown", auto refill triggering on boot, premature pump stop in inverted mode with two sensors, pump_stopped logbook entries on rejected starts

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

bharvey88 and others added 30 commits February 24, 2026 18:43
…ions

- Remove redundant esp32 board string (variant + flash_size already present)
- Add web_server version: 3 to Core.yaml
- Remove platformio_options board_build.flash_mode from both device YAMLs
- Remove legacy BLE wifi on_connect/on_disconnect hooks from PUMP-1.yaml
[esphome] Modernise board spec, web server v3, remove legacy options
[version] Add ESPHome and Apollo firmware version sensors
Adds two new optional config switches (off by default):
- Invert Water Logic: flips input sensor meaning so DRY = destination low = start pump, WET = destination full = stop pump
- Auto Refill: automatically triggers pumpUntilFull when input sensor goes dry in inverted mode

Resolves #22
When stop_pump_when_full is ON, the output sensor already handles full
detection. Skip the inverted-mode input sensor stop to prevent the pump
from stopping as water passes the low-level sensor on the way to full.
Bump version to 26.3.2.1
[cpap] Add invert water logic and auto refill for CPAP filling use case
The sensor was showing "unknown" because update_interval: never prevents
the lambda from ever firing. Removing it allows the default 60s periodic
update to publish the version string.
Fix Apollo Firmware Version sensor showing unknown
Per ESPHome dev feedback: the version is a compile-time constant, so
publish it once on_boot rather than using a lambda with periodic updates.
Add text_sensor.template.publish for apollo_firmware_version at
priority 500 to PUMP-1_Minimal for dashboard import users.
Fix: publish firmware version once on boot instead of polling
Adds a homeassistant.action logbook.log call in the fluid_input_sensor
on_release handler so that HA logbook records when the pump is triggered
automatically by the CPAP auto refill + invert water logic mode.
[cpap] Add logbook entry for auto refill trigger
Replaces the homeassistant.action logbook.log approach from #32 with an
ESPHome event entity, which surfaces natively in the HA logbook without
requiring API actions to be enabled on the device.

Fires three event types:
- auto_refill_triggered: CPAP auto refill + invert water logic triggers pump
- pump_started: pump_control turns on and conditions are met
- pump_stopped: pump_control turns off
pump_start_time is only set when the pump actually starts successfully.
Checking != 0 before logging and emitting pump_stopped prevents false
logbook entries when a start is rejected and switch.turn_off is called
from the else branch of on_turn_on.
…tries

ESPHome event entities show only a generic 'detected an event' string in
the HA logbook. Replaces the Pump Activity event entity with a Last Pump
Action text sensor whose state changes (Auto Refill Triggered, Pump
Started, Pump Stopped) appear verbatim in the HA logbook.
[cpap] Add Last Pump Action text sensor for HA logbook
…switches

Renames the switch name, id, and all 4 condition references from
invert_water_logic to tank_refill_mode for clarity.

Adds on_turn_on/on_turn_off handlers to auto-configure related switches:
- Turn ON: Stop Pump When Output Wet → ON, Stop Pump When Input Dry → OFF
- Turn OFF: Stop Pump When Output Wet → OFF, Stop Pump When Input Dry → ON
…de state

on_turn_on/on_turn_off only fire when explicitly toggled, not on boot
restore. Adds a priority -20 on_boot handler that reads tank_refill_mode
and sets stop_pump_when_full and stop_pump_when_dry accordingly so all
three switches are in sync after every reboot.
…witches

[ux] Rename Invert Water Logic to Tank Refill Mode + auto-configure switches
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Warning

Rate limit exceeded

@bharvey88 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 54 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 54 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 52a82d02-cf84-49bc-a4bc-f8a1930b564f

📥 Commits

Reviewing files that changed from the base of the PR and between b280add and 623f8cb.

📒 Files selected for processing (3)
  • Integrations/ESPHome/Core.yaml
  • Integrations/ESPHome/PUMP-1.yaml
  • Integrations/ESPHome/PUMP-1_Minimal.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch beta

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 and usage tips.

@github-actions github-actions bot added the breaking-change Breaking change label Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants