Add dimming_curve to dimmable lights and variable fans #143

Merged
Claude merged 2 commits from feat/yaml-dimming-curve into feat/yaml-nodes 2026-10-17 20:14:29 +00:00
Collaborator

YN-25. dimmable_light and variable_fan take an optional dimming_curve, one of the ctrl::Ease names in snake_case (linear, quad_in, quad_out, quad_in_out, and the same for cubic, quart and quint), default linear. The generator sets .outputEase on the PwmConfig, as the hand-written lighting node does with QuintIn for its seating and kitchen circuits; a linear curve emits nothing, so existing nodes generate the same code. The fade ease stays linear. The names come from one table in the generator that mirrors the enum in lib/node-runtime/src/easing.h, and the schema takes its enum from it. heater_blower does not take the field.

Generator, schema, README and Python tests only. The README gets the field in both type rows and a short paragraph on the names. The LOLIN32 fixture uses quint_in on its fan and quad_in_out on its ceiling light, so CI compiles two curves.

Tested: Python 144 (was 140), none skipped locally. Tests cover the mapping for a spread of names, the default and its unchanged output, an unknown name, the field being refused on a plain light, and the schema; always emitting Linear fails them. All fixtures build.

YN-25. `dimmable_light` and `variable_fan` take an optional `dimming_curve`, one of the `ctrl::Ease` names in snake_case (`linear`, `quad_in`, `quad_out`, `quad_in_out`, and the same for `cubic`, `quart` and `quint`), default `linear`. The generator sets `.outputEase` on the `PwmConfig`, as the hand-written lighting node does with `QuintIn` for its seating and kitchen circuits; a linear curve emits nothing, so existing nodes generate the same code. The fade ease stays linear. The names come from one table in the generator that mirrors the enum in `lib/node-runtime/src/easing.h`, and the schema takes its enum from it. `heater_blower` does not take the field. Generator, schema, README and Python tests only. The README gets the field in both type rows and a short paragraph on the names. The LOLIN32 fixture uses `quint_in` on its fan and `quad_in_out` on its ceiling light, so CI compiles two curves. Tested: Python 144 (was 140), none skipped locally. Tests cover the mapping for a spread of names, the default and its unchanged output, an unknown name, the field being refused on a plain light, and the schema; always emitting Linear fails them. All fixtures build.
Add dimming_curve to dimmable lights and variable fans
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
0645233fa5
Guard the dimming curve names against the runtime enum
All checks were successful
Build and test / build (pull_request) Successful in 5m35s
Build and test / release (pull_request) Has been skipped
2a902ad8d0
Claude merged commit 8e85502ceb into feat/yaml-nodes 2026-10-17 20:14:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
CamperCan/CampervanControlSystems!143
No description provided.