Add a water_heating type sharing a flow5d heater #142
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/yaml-water"
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?
YN-24, reworked after review. Stacks on #141 (YN-23), so the diff also shows that PR's commits (and #140, #139, #137 under it) until they merge.
New output type
water_heating: a switch that heats water through the sameflow5das space heating. Fields areheater(label of the flow5d, same node only),delta(°C to one decimal place, 0 to 20, or the label of a same-nodesettingofsetting_type: temperature),bindsanddisabled_modes. It has no pin, and a node can have one. It reports as aSwitch, sostrategyForalready covers it andtoggleandfollowbinds work through itssetOn.WaterHeatingandHeaterDemandArbitermoved fromsrc/node_heaterintolib/autoterm, with the Flow 5D code whose output they manage, and fromheater::toautoterm::. They are specific to that heater, so they do not belong in the runtime. The hand-written heater node changes its includes (angle brackets) and the two namespaces and nothing else, andtest_water_heatingchanges only the namespace. No behaviour change.When a
water_heatingexists the generator declares anautoterm::HeaterDemandArbiteronflow5dand gives the heater endpointheaterDemand.spaceHeating()as its device instead offlow5d; without the type the output is unchanged. Water heating takesheaterDemand.waterHeating(), the delta setting, and the coolant and return readings. Its warm threshold is the blower's threshold setting when the node has aheater_blower, otherwise the heater's warm-up wait setting (index 10, "Target coolant temp"); the README says which. A literaldeltabecomes an unregisteredSettingEndpoint, as a literal blower threshold does, through one shared path. The water heating object is declared after all endpoints, so list order does not matter.Schema regenerated (
heateranddeltarequired,deltaas number or label). README gets the type row and a Water heating section. The heater fixture gains one, with a setting label for the delta and a toggle bind.Tested: Python 133 and native 639, none skipped locally. Tests cover the heater-label resolution, the cross-node and second-instance rejections, both delta forms and ranges, the arbiter wiring appearing only when the type is present, and the threshold choice with and without a blower; dropping the arbiter wiring fails them. All fixtures and
pio runbuild.Claude referenced this pull request2026-10-17 09:40:49 +00:00
@ -0,0 +1,50 @@#pragma onceThis file shouldn't be part of the runtime as it's hardware specific. Put it with the flow5d as it's code to manage the output from that
41b2f52eb937e9bea090Two minor points.
flow5dWarmUpWait = 10repeats the index already keyed inflow5dSettings. Derive it from there, or it drifts silently.deltarejects a label of the wrong setting type (e.g. a toggle or duration setting). Only a missing label and a non-setting endpoint are covered. This is the "wrong kind can't satisfy the reference" case.