Use Quantity types for historic state functions. #281
Labels
enhancement
New feature or request
ohc / addon
Needs to be fixed in openHAB Core or JS Scripting addon
I have following code (generated by Blockly, but that is not relevant in the context):
PVETotalGS1
andPVETotalGS2
are both Number:Energy items.for
history.historicState
a state is returned, which can then be used for Quantity calculations in line 4.history.deltaSince
return a numeric (not a QuantityType), so I had to explicitely attach the unit. To be consistent, it would be more logical to return a Quantity Type instead for this function as well.The same argument would apply to other history functions.
The text was updated successfully, but these errors were encountered: