Hi,
I’d like to report a potential issue with using persistence values in rules, which I’m not sure a bug or designed by purpose. I have configured an item that is in Number:Volume type with unit “l”, it keeps track of water usage. I have some rules that calculate the usage per hour/day/month etc.
I noticed that if I use historicState, it returns a QuantityType which makes sense. However if I use deltaSince it only returns a Number.
Is it designed by purpose to strip the UoM for deltaSince or could it be a bug? I have the below 2 workarounds:
- Either convert the Number to QuantityType when using deltaSince
- Get currentState and minus historicState (which gives a QuantityType)
I’m on OH 4.0.1