1
0
Fork
You've already forked esphome-components
0

feat(ezo_types): ORP extended-scale readback + refresh button; drop datalogger #5

Merged
stackdrift merged 4 commits from feat/ezo-switch-readback into main 2026年05月31日 16:57:52 +02:00

Summary

Finalizes the ezo_types config-entity readback and drops datalogger support.

  • ORP extended_scale switch now reads its state back from the circuit (ORPext,? in setup() → publish), mirroring the EC cell-constant / TDS readback. Display-only mirror; writes still send the command.
  • "Refresh Circuit State" template button re-queries the readback entities (cell constant, TDS factor, extended scale) on demand — re-syncs after runtime changes without a reboot.
  • Datalogger support removed entirely. Enabling the logger over I2C works (D,n), but the stored points can only be bulk-read with M,all in UART mode; over I2C only single-slot M (pointer-walking) and M,? exist, so there's no clean way to surface the 50 logged readings. A toggle would be a write-only control with unreadable captured data, so it's gone (switch, D,? readback, datalogger: key, docs).
  • ezo_types/README.md — the component's first README (schema, temperature-compensation model with the °C-only stance + copy-sensor pattern for °F/K, state readback).

Test plan

  • ./docker/esphome compile configs/test-ezo-types.yaml — green on ESPHome 2026年5月1日.
  • Hardware-flashed: RTD Datalogger entity gone (404), ORP Extended Scale + Refresh button intact (200), boots clean.
  • ORP extended-scale readback previously hardware-verified (?ORPEXT,1 parsed); unchanged by the removal.

Note: the add-then-remove of the datalogger across this branch's commits is development history — squash-merge for a clean single commit on main if preferred.

## Summary Finalizes the `ezo_types` config-entity readback and **drops datalogger support**. - **ORP `extended_scale`** switch now reads its state back from the circuit (`ORPext,?` in `setup()` → publish), mirroring the EC cell-constant / TDS readback. Display-only mirror; writes still send the command. - **"Refresh Circuit State"** template button re-queries the readback entities (cell constant, TDS factor, extended scale) on demand — re-syncs after runtime changes without a reboot. - **Datalogger support removed entirely.** Enabling the logger over I2C works (`D,n`), but the stored points can only be bulk-read with `M,all` in **UART** mode; over I2C only single-slot `M` (pointer-walking) and `M,?` exist, so there's no clean way to surface the 50 logged readings. A toggle would be a write-only control with unreadable captured data, so it's gone (switch, `D,?` readback, `datalogger:` key, docs). - **`ezo_types/README.md`** — the component's first README (schema, temperature-compensation model with the °C-only stance + `copy`-sensor pattern for °F/K, state readback). ## Test plan - `./docker/esphome compile configs/test-ezo-types.yaml` — green on ESPHome 2026年5月1日. - Hardware-flashed: RTD Datalogger entity gone (404), ORP Extended Scale + Refresh button intact (200), boots clean. - ORP extended-scale readback previously hardware-verified (`?ORPEXT,1` parsed); unchanged by the removal. Note: the add-then-remove of the datalogger across this branch's commits is development history — squash-merge for a clean single commit on `main` if preferred.
The RTD datalogger and ORP extended-scale switches were write-only, so on
boot they showed their default rather than the circuit's actual state.
Mirror the cell-constant/TDS readback: the switches query D,? / ORPext,?
in setup(), and parse_*_response_ publishes the parsed state to the switch
(display-only, no write-back) via a back-pointer from the sensor.
Add a "Refresh Circuit State" template button that re-queries every
readback entity (cell constant, TDS factor, datalogger, extended scale)
on demand -- useful for re-syncing after runtime changes without a reboot.
Hardware-verified with the button: the circuits return their real state
(?D,60, ?ORPEXT,1, ?K,1.00, ?TDS,0.50) and each entity updates. Note the
datalogger and extended scale are NOT power-retained (per the RTD
datasheet retained list), so they reset to off on every power cut/reboot;
the startup readback reflects that correctly, and the button re-syncs
after runtime changes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Document the component now that it's feature-complete: the four circuit
types and their config keys, the temperature-compensation model, and the
state-readback behavior.
The temperature section spells out the C-only stance -- pH/EC/ORP
compensation is Celsius by protocol, so the RTD reports C and the
component deliberately does not expose a circuit-scale control (a footgun
that would silently corrupt compensation). Displaying F/K is a
presentation concern; document the copy-sensor pattern for it instead.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The RTD datalogger can be enabled over I2C (D,n), but its stored readings
can only be bulk-recalled with M,all in UART mode -- the I2C command set
only offers single-slot M (which walks an internal pointer) and M,?. So
over I2C there is no clean way to surface the 50 logged points; a logger
toggle would be a write-only control whose captured data you cannot read
back.
Rather than ship that half-feature, remove datalogger support entirely:
the DataloggerSwitch, the RTD D,? readback, the `datalogger:` config key,
and its docs. The ORP extended-scale readback added alongside it stays.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
stackdrift changed title from (削除) feat(ezo_types): datalogger/extended-scale readback + refresh button (削除ここまで) to feat(ezo_types): ORP extended-scale readback + refresh button; drop datalogger 2026年05月31日 16:01:27 +02:00
Enabling extended scale widens the ORP range from ±1020 mV to ±2040 mV
but halves accuracy from ±1 mV to ±2 mV. Note it in the orp config-var
docs and the example comment so it reads as a range-vs-accuracy trade,
not free headroom.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
stackdrift deleted branch feat/ezo-switch-readback 2026年05月31日 16:57:52 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
stackdrift/esphome-components!5
Reference in a new issue
stackdrift/esphome-components
No description provided.
Delete branch "feat/ezo-switch-readback"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?