Right now I have such items
....
Number HT_Temperature1 { channel="mihome:sensor_ht:1:temperature" }
Number HT_Temperature2 { channel="mihome:sensor_ht:2:temperature" }
Number HT_Temperature3 { channel="mihome:sensor_ht:3:temperature" }
....
Is it possbile (if yes how) to create group in items to write this rule in such way:
rule "Temperature_control"
when
Item gSensor changed
then
var sensor = gSensor. members.filter[sensor | sensor.lastUpdate != null].sortBy[lastUpdate].last
if(sensor == null) logWarn("FILE", "Temperature_control: Something is missing, no Item has a valid lastUpdate!")
// temperatura z sensora
var Number currTemperature = sensor.state as DecimalType
if( sensor.name == "TempSensorSaloon" ) {
<DO SOMETHING>
............
I know how to define if I have binary contacts using “OR” but how to define such group if I have “Number” items?