Blockly UoM lost by state average

Hello,

I am in the progress of migrating my old OpenHAB 3 Blockly rules to OpenHAB 4. To my surprise it seems like the UoM is getting lost by calculating the average of an item state with the persistence block.

Is this a wanted effect? Am I doing something wrong?

I expected that the average of an item state still has the same UoM as the item.

The averageSince persistence action (and any of the other persistence actions for that matter) has never returned included units. I think I saw a PR in work to add them (since with other changes to UoM persistence can now reliably know the unit) but that’s not implemented and merged yet.\

It’s not Blockly specific. It’s not supported in any rules language to my knowledge.