I’ve got two issues (I think).
- VSCode is showing no issue with validation but I get the following error
[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Hotwater Hotwater_Booster Switch’: Could not cast 34.63 C to org.eclipse.smarthome.core.library.types.DecimalType; line 90, column 26, length 29
on this line:
rule:
var double HotwaterTempBefore = 0.0
..
HotwaterTempBefore = (HOTWATER.state as DecimalType).floatValue
items
Number:Temperature HOTWATER "Hotwater temperature [%.1f C]" <temperature>
Number:Temperature HotwaterLow "Hotwater Low temperature [%.1f C]" <temperature> (hotwater) //38.0
Number:Temperature HotwaterVeryLow "Hotwater very low temperature [%.1f C]" <temperature> (hotwater) // 29.0
issue 2. which vscode is showing two errors “type mismatch”
Type mismatch: cannot convert from State to Number
on this line:
if (HOTWATER.state < HotwaterLow.state ) {
msg = "Hotwater Temp is low, threshold (" + HotwaterLow.state + ") \n" + msg
....