Open kpine opened 2 days ago
@kpine I was going to implement this but I noticed that some values already report this in the hint. It could be a bit redundant in such cases.
Suggestions? cc @AlCalzone
Those hints you mention exist only for configuration parameters, and they should only exist in cases that cannot be modeled with min/max/step, e.g. in the case here with one value outside the "normal" range. Respecting the min/max/step where they exist is a good idea in general.
Respecting the min/max/step where they exist is a good idea in general.
I already respect them on UI the problem here is that actually I don't show them. My idea was to add it to the hint but then I saw some hints already have them so I was wondering what's the best choice here
What I only miss here is step
that I wasn't aware it existed. I can add it but the question remains open for min/max value, should I show them? If yes where?
Is your feature request related to a problem? Please describe. The UI for the Values doesn't show min / max and step restrictiosn. If you set a value outside of the range, the command will report an error.
Describe the solution you'd like Indicate min / max and step in the UI next to the Value somewhere. Or validate the value client side before allowing it to be sent (but I might want to force an invalid value for some debug purpose?). Or do this for select Values, like wake up interval.
Describe alternatives you've considered N/A
Additional context I was setting the wake up interval for a battery device (ZSE41). I usually use 7 days (604,800 seconds), most of my devices all this. I tried with a Zooz and got an error flash in the UI. When I checked the value it was set to 86400 seconds instead.
I checked the node dump and it lists a min and max value, for this device, as well as a step value of 60 seconds. 7 days is out of range (so would non-multiples of 60). It would be preferable to know this prior to setting an invalid value.