I’m working with a few temperature sensors now that have temp offsets and I find the current way of using a proxy item to be a bit more complex and hard to navigate than I expected. I thought that a simple binding might be able to solve this issue, but I’m posting here first because I think there’s a high chance that this is not doable.
The idea is to have a an offset binding that works on Number items. If you set, say offset="-1.2", then it would take the number and offset it when setting the item. Simple in concept. I like this because it documents the offset right where the Item is defined and keeps it all in one tidy place, which is my goal here.
The problem is that this Binding would have to ideally intercept the value being set and do the offset before the change occurs as to avoid issues with double setting the value which would cause persistence issues as well as could cause issues triggering rules (and other stuff I probably can’t foresee).
Is this impossible to do this way? Or maybe there is already a similar feature that I haven’t found yet?