openhab-vscode
openhab-vscode copied to clipboard
QuantityType parsing
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.
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) "