Add a setting type with setting_type, and humidity #139

Merged
Claude merged 5 commits from feat/yaml-climate into feat/yaml-nodes 2026-10-17 19:46:27 +00:00
Collaborator

YN-20, reworked after review. Stacks on #137 (YN-19, optional endpoint index), so the diff also shows that PR's commits until it merges.

The four setting types become one endpoint type, setting, with a required setting_type of toggle, duration, percentage or temperature. The fields per setting type are what they were: default (a bool) for toggle, and min, max and default with the existing ranges and scales for the other three. toggle, duration and percentage were already on feat/yaml-nodes, so this PR renames them too; the old names are no longer endpoint types. Every reference by label (enabled_by, hold, night_brightness, the bind on_delay and run_time) now checks setting_type instead of the endpoint type. The generated C++ is unchanged.

temperature is the new setting type: a ctrl::SettingEndpoint with can::SemanticClass::Temperature, on the node's store with the usual s<index> key. YAML values are degrees Celsius, 0 to 120, to one decimal place (18.55 is rejected), and go on the wire as tenths. The range settings share one table of semantic class and wire scale.

Humidity is unchanged: a ctrl::ReadoutEndpoint of can::EndpointType::Humidity reading climateSensor.humidity() from the Si7021 that the temperature sensor type declares. It takes no pin, at most one is allowed, and it needs a temperature endpoint on the node.

The schema has one setting entry per setting_type (each branch fixes setting_type and lists only that kind's fields), so the property lists stay exact. README has one setting row and a Settings section with a setting_type table. The three fixtures use the new form, and the C3 fixture also has a temperature sensor, humidity and a temperature setting.

Tested: Python 103 (was 100 before this rework) and all fixtures build, none skipped locally. New tests cover a missing or unknown setting_type, the old names being rejected as types, and the schema requiring setting_type; the existing setting, reference and render tests were moved to the new form.

YN-20, reworked after review. Stacks on #137 (YN-19, optional endpoint index), so the diff also shows that PR's commits until it merges. The four setting types become one endpoint type, `setting`, with a required `setting_type` of `toggle`, `duration`, `percentage` or `temperature`. The fields per setting type are what they were: `default` (a bool) for `toggle`, and `min`, `max` and `default` with the existing ranges and scales for the other three. `toggle`, `duration` and `percentage` were already on feat/yaml-nodes, so this PR renames them too; the old names are no longer endpoint types. Every reference by label (`enabled_by`, `hold`, `night_brightness`, the bind `on_delay` and `run_time`) now checks `setting_type` instead of the endpoint type. The generated C++ is unchanged. `temperature` is the new setting type: a `ctrl::SettingEndpoint` with `can::SemanticClass::Temperature`, on the node's store with the usual `s<index>` key. YAML values are degrees Celsius, 0 to 120, to one decimal place (18.55 is rejected), and go on the wire as tenths. The range settings share one table of semantic class and wire scale. Humidity is unchanged: a `ctrl::ReadoutEndpoint` of `can::EndpointType::Humidity` reading `climateSensor.humidity()` from the Si7021 that the `temperature` sensor type declares. It takes no pin, at most one is allowed, and it needs a `temperature` endpoint on the node. The schema has one `setting` entry per `setting_type` (each branch fixes `setting_type` and lists only that kind's fields), so the property lists stay exact. README has one `setting` row and a Settings section with a `setting_type` table. The three fixtures use the new form, and the C3 fixture also has a temperature sensor, humidity and a temperature setting. Tested: Python 103 (was 100 before this rework) and all fixtures build, none skipped locally. New tests cover a missing or unknown `setting_type`, the old names being rejected as types, and the schema requiring `setting_type`; the existing setting, reference and render tests were moved to the new form.
Make endpoint index optional with auto-increment
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
a105a004cd
Rename next_index and restore the README wrapping
All checks were successful
Build and test / build (pull_request) Successful in 5m46s
Build and test / release (pull_request) Has been skipped
2448011705
Add temperature_setting and humidity types to YAML nodes
Some checks failed
Build and test / build (pull_request) Has been cancelled
Build and test / release (pull_request) Has been cancelled
117844c82a
List the climate checks in the schema description and wrap the README
Some checks failed
Build and test / release (pull_request) Has been cancelled
Build and test / build (pull_request) Successful in 6m49s
b6806810a9
Rewrap the settings paragraph
All checks were successful
Build and test / build (pull_request) Successful in 6m57s
Build and test / release (pull_request) Has been skipped
77e437053f
rob requested changes 2026-10-17 16:25:17 +00:00
Dismissed
rob left a comment

Can we change the type for temperature_setting for setting, with a setting definition property of setting_type: temperature?

Can we change the type for `temperature_setting` for `setting`, with a setting definition property of `setting_type: temperature`?
Claude changed title from Add temperature_setting and humidity types to YAML nodes to Add a setting type with setting_type, and humidity 2026-10-17 16:39:02 +00:00
rob force-pushed feat/yaml-climate from 77e437053f
All checks were successful
Build and test / build (pull_request) Successful in 6m57s
Build and test / release (pull_request) Has been skipped
to ebee3c0298
All checks were successful
Build and test / build (pull_request) Successful in 5m13s
Build and test / release (pull_request) Has been skipped
2026-10-17 16:39:02 +00:00
Compare
Reject a setting_type or type that is not a string
All checks were successful
Build and test / build (pull_request) Successful in 2m4s
Build and test / release (pull_request) Has been skipped
43616a11ea
rob approved these changes 2026-10-17 19:38:15 +00:00
Claude merged commit f6874f1479 into feat/yaml-nodes 2026-10-17 19:46:27 +00:00
Sign in to join this conversation.
No reviewers
rob
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!139
No description provided.