Problem updating group item after OH3 upgrade


I’ve this item:

Group:Number    gMiTempLounge                        "Mi Temp/Hum Lounge [%.1f °C]"                                                  <temperature>
Number          GP0_Mi_Temp_Lounge_Wifi_Strength     "Mi Temp/Hum WiFi Signal Strength [%d %%]"                              <network>       (gMiTempLounge)                                                         { channel="mqtt:topic:rabbitmq:mi-temp-lounge:rssi" }
Number          GP0_Mi_Temp_Lounge_Distance          "Mi Temp/Hum WiFi Distance [%.2f]"                                              <network>       (gMiTempLounge)                                                         { channel="mqtt:topic:rabbitmq:mi-temp-lounge:distance" }
Number          GP0_Mi_Temp_Lounge_Temp              "Mi Temperatura Lounge [%.2f °C]"                                               <temperature>   (gTemp,gMiTempLounge)                                           { channel="mqtt:topic:rabbitmq:mi-temp-lounge:temperature" }

And in OH2 this rule:

rule "update mi lounge temp"
    Member of gMiTempLounge received update
    System started
    logInfo("group-updates", "gMiTempLounge before: " + gMiTempLounge.state + " temp: " + GP0_Mi_Temp_Lounge_Temp.state)
    logInfo("group-updates", "gMiTempLounge after: " + gMiTempLounge.state + " temp: " + GP0_Mi_Temp_Lounge_Temp.state)


2021-01-25 22:39:54.677 [INFO ] [] - gMiTempLounge before: UNDEF temp: 16.8
2021-01-25 22:39:54.678 [INFO ] [] - gMiTempLounge after: UNDEF temp: 16.8
2021-01-25 22:39:54.679 [INFO ] [] - gMiTempLounge before: 16.8 temp: 16.8
2021-01-25 22:39:54.679 [INFO ] [] - gMiTempLounge after: 16.8 temp: 16.8

Works, but in OH3 sometimes, I have UNDEF in update. Something changed in OH3?


I think this might actually be cause by the postUpdate being asynchronous and hence the after log command is almost instantaneous.

You’re not supposed to be able to postUpdate to a Group. I’m surprised it ever did anything. Group states (if any) are supposed to be calculated from an aggregation of some kind of the members states.
Maybe it reverts to UNDEF every time a member updates.

But yes, even if it works, like any postUpdate or command it is asynchronous, your rule does not stop and wait for it to take place.