diff --git a/components/pid/TODO.md b/components/pid/TODO.md index 62a7c9b..cb1e0d0 100644 --- a/components/pid/TODO.md +++ b/components/pid/TODO.md @@ -44,16 +44,16 @@ git history for `temp_controller.py`/`temp_controller_smith.py`). the two-model Smith correction itself still have no dedicated coverage. This drives a physical heater — worth extending. -- [ ] **`set_model_power` isn't defined on every controller, but - `brewpi.py` wires it unconditionally.** `brewpi.py` always does - `heater.set_on_changed("power_set", tc.set_model_power)` regardless - of `Controller.pid_type`. Only `temp_controller_smith.py` (the Smith - predictor) defines `set_model_power`; `temp_controller.py` (`"Normal"`) - does not, so starting the server with `"pid_type": "Normal"` crashes - at wiring time with `AttributeError: 'TempController' object has no - attribute 'set_model_power'`. Either add a no-op `set_model_power` to - `TempControllerBase`, or only wire it when the configured controller - actually exposes a model to feed. +- [x] **`set_model_power` isn't defined on every controller, but + `brewpi.py` wires it unconditionally.** Fixed: `TempControllerBase` + now has a no-op `set_model_power`/`set_ambient_temperature`/ + `set_model_plant_params` (`temp_controller_base.py:83-90`), so + `brewpi.py`'s unconditional `heater.set_on_changed("power_set", + tc.set_model_power)` no longer crashes for `"pid_type": "Normal"` - + `temp_controller_smith.py` still overrides `set_model_power` to + actually feed its internal model. The redundant `hasattr()` guards + at both call sites (`brewpi.py`, `components/sud_forecast.py`) were + removed along with it. - [ ] **Config access is unchecked `dict[key]` everywhere.** `params['Hold']`, `params['Td']`, etc., throughout, with no schema