Error in formerly (2.5) working rules

items:
Number:Temperature Wettervorhersage_Auszentemperatur
Number:Temperature Sommer_Abschalttemperatur

In OH3 VSC reports Sommer_Abschalttemperatur.state Type mismatch cannot convert from state to number. Both items habe °C values.
What could be the reason that the following expression isn’t running in OH 3 anymore?

if (Wettervorhersage_Auszentemperatur.state > Sommer_Abschalttemperatur.state) {

Even more interestingly the same expression works in another rule and doesn’t in 3 rules.

It works if I use:
if ((Wettervorhersage_Auszentemperatur.state as Number) > (Sommer_Abschalttemperatur.state as Number)) {