Hi,
I’m thinking about doing some minor improvements on the ComfoAir-Binding and wanted some opinions on a few things where I’m undecided beforehand.
- as mentioned in an other thread (Migrating addons to v4.0 - list of necessary changes available?) the way to go is to support
DecimalType
ANDQuantityType
forNumber
channels. AFAIR, sending a value with unit (QuantityType
) to a plainNumber
channel should work out of the box in terms that the unit is just stripped. So basically I would just have to make sure, that sending a plainDecimalType
is supported byNumber:<dimension>
channels, right? - Most/all
state pattern
s forNumber:<dimension>
channels used in the binding’sthing-types.xml
have%unit%
set. Is this still the way to go after the UoM changes for OH4 or should a dedicated unit be used instead (or no predefined state description at all)? - When does the use of UoM make sense? There are some channels (mainly time-related) that do not use UoM yet as using any other unit than the default would not make much sense IMO. E.g., the
filterWeeks
channel (to set the “lifetime” of the filter between changing) uses weeks internally, so using, e.g., hours on item side makes not to me but rather creates a wrong impression of accuracy as it has to be stripped to full weeks internally. But this may be just my personal impression and users should be allowed to display and work with any unit they like… So should we use UoM in bindings wherever possible? - Is there a way to set
min
andmax
values for UoM channels? There are a few channels that could useNumber:Dimensionless
but they have other limits than0%..100%
, so even if the limits are just used in UI, I would like to make use of them wherever possible. - I couldn’t find a unit for rotational speed (i.e., RPM) even though it seems quite common to me. I could try to create a PR to but I’m not sure about the dimension: IMO it belongs to
Frequency
, but it could also be a newRotationalSpeed
dimension (which would probably better fit for angular velocity likerad/s
as well).
I would be happy for any advices!
BR Hans