openhab-vscode icon indicating copy to clipboard operation
openhab-vscode copied to clipboard

QuantityType parsing

Open mstormi opened this issue 3 years ago • 1 comments

I came across the fact that VSC does not parse UoM QuantityTypes well, a line like var t = new QuantityType<DateTime>("1 h") works to compile but VSC does not like the "DateTime".

PS: on a sidenote, it should be "Time" rather than "DateTime" according to UoM docs but that rules DSL does not like... strange but possibly a DSL bug.

mstormi avatar Mar 30 '21 14:03 mstormi

I encountered an issue related to this, discussed in the Community https://community.openhab.org/t/add-uom-to-rules-calculated-variable-solved/126290. Rule runs OK, but VSC gave this warning: "Bounds mismatch: The type argument <Object> is not a valid substitute for the bounded type parameter <T extends Quantity<T>> of the constructor QuantityType<T>(String) "

BigGeorgeTx avatar Sep 08 '21 01:09 BigGeorgeTx