-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Feedback
The documentation of the LVGL spinbox could use some improvements
- The examples still use
step, that was converted toselected_digitrecently - The documentation of the
incrementanddecrementactions referencestep - The
updateaction seems to be just a binding for the low-level LVGL spinbox and itsvalueneeds to be scaled; ifdecimal_placesis 1, I need to update to 200, not 20.0 to see 20.0. Not sure this is intended though, will create an issue in the main repo for that. - the configuration
valuealso does not seem to be scaled in the code - there is justlv.spinbox_set_value(w.obj, await lv_float.process(value))- but I am currently not able to getvaluehere working at all, so will also investigate and create an issue in the main repo.
Regarding the points 3 and 4, generally, a user unfamiliar with the details of the low-level LVGL library is unaware of the fact that the spinbox only processes integers there and any scaling between the float values in the ESPHome application realm and that integer according to the decimal_places has to happen somewhere.
I don't know what the developers' take on this is and whether the users should be completely shielded from that until they need to use low-level lv_spinbox_... at which point they probably know what they are doing, or whether they need to take the intricacies of the LVGL into account. If the latter, the fact should probably be mentioned in the documentation. I think that they should be shielded, meaning that for the 3 and 4 the code needs to be changed, and for 1 and 2 the documentation should, but that's just my opinion.
Thanks
URL
https://esphome.io/components/lvgl/widgets/#spinbox
Additional information
No response