homieiot / convention

🏡 The Homie Convention: a lightweight MQTT convention for the IoT
https://homieiot.github.io/
Other
705 stars 59 forks source link

add a "step" or "precision" element to the number formats #233

Closed Tieske closed 1 year ago

Tieske commented 1 year ago

The current format for numbers accepts min and max, but no precision.

Can we make the format look like: min:max:step ?

Benefits:

Examples:

Tieske commented 1 year ago

based on #216 ; the proposal above specifies the min+max as "inclusive"

Tieske commented 1 year ago

Not supported case is "only odd numbers" (no min/max). This forces "base" to be non-0.

Tieske commented 1 year ago

In the case that neither min nor max is specified, the current value of the property can be used to determine the base.