Hello all,
I am currently converting my smart home to Openhab 4.0.
In the living room are 2 heating thermostats installed, which measure the room temperature.
For the display of this temperature and the room control I would like to determine the average temperature.
This I tried with a DSL Rule. The following error occurs.
The temperatures of the individual thermostats are read out correctly (each approx. 22° C).
With addition of the temperatures however values of approx. 600 ° C come out.
can someone tell me how the problem can be solved?
The code of the DSL Rule:
var WZTemp = ((Thermostat_Wohnnzimmer_Ost_Current_temperature.state as Number) + (Thermostat_Wohnnzimmer_Ost_Current_temperature.state as Number))/2
postUpdate(MQTT_Wohnzimmer_Durchschnittstemperatur, WZTemp)
kind regards
Johannes Röding