Type mismatch: cannot convert from BigDecimal to Number

Hello. This part of the rule works without problems:

var Number AlarmClockMinuteOfDay = 0

AlarmClockMinuteOfDay -= (TheSun_TheSunriseduration.state as Number).intValue

But VSC highlights the “-=” operation with this error:

Type mismatch: cannot convert from BigDecimal to Number(org.eclipse.xtext.xbase.validation.IssueCodes.incompatible_types)

Why it happens?

Similar item that is mentioned here: Yet another WakeUp Light Rule - #3 by Selter
Seems to be a false warning/error in VSC.

1 Like

Thank you!