Add a setting type with setting_type, and humidity #139
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/yaml-climate"
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-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 requiredsetting_typeoftoggle,duration,percentageortemperature. The fields per setting type are what they were:default(a bool) fortoggle, andmin,maxanddefaultwith the existing ranges and scales for the other three.toggle,durationandpercentagewere 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 bindon_delayandrun_time) now checkssetting_typeinstead of the endpoint type. The generated C++ is unchanged.temperatureis the new setting type: actrl::SettingEndpointwithcan::SemanticClass::Temperature, on the node's store with the usuals<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::ReadoutEndpointofcan::EndpointType::HumidityreadingclimateSensor.humidity()from the Si7021 that thetemperaturesensor type declares. It takes no pin, at most one is allowed, and it needs atemperatureendpoint on the node.The schema has one
settingentry persetting_type(each branch fixessetting_typeand lists only that kind's fields), so the property lists stay exact. README has onesettingrow and a Settings section with asetting_typetable. 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 requiringsetting_type; the existing setting, reference and render tests were moved to the new form.Can we change the type for
temperature_settingforsetting, with a setting definition property ofsetting_type: temperature?Add temperature_setting and humidity types to YAML nodesto Add a setting type with setting_type, and humidity77e437053febee3c0298