Hello,
i try to create HUMIDEX but i have this problem:
[ERROR] [m.r.internal.engine.RuleEngine] - Error during the execution of startup rule ‘Calcolo Humidex’: Cannot cast org.openhab.core.types.UnDefType to void
This is the item:
Number Humidex_miniapp “Temp.apparente [%.1f °C]” (Weather)
This is the rules:
rule "Calcolo Humidex"
when
Item Fibaro_Motion_1_Temp changed or
Item Aeon_motion_humidity changed or
System started
then
var Number T = Fibaro_Motion_1_Temp.state as DecimalType
var Number H = Aeon_motion_humidity.state as DecimalType
var Number x = 7.5 * T/(237.7 + T)
var Number e = 6.112 * Math::pow(10, x.doubleValue) * H/100
var Number humidex = T + (new Double(5) / new Double(9)) * (e - 10)
postUpdate(Humidex_miniapp, humidex);
end
Don’t understand where is the error
Thanks in advance!