Group average

I recently purchased a new Miflora sensor, however this sensor is out of range, hence:

Number Miflora_Sensor6_Temperature "Sensor6 Air Temperature [%.1f °C]" <text> (Group_Miflora, Group_Temperature,Group_Temperature_LivingRoom) {mqtt="<[mosquitto:miflora/sensor6:state:JSONPATH($.temperature)]"}

is uninitialized, this again leads to that my group average is failing:
Group:Number:AVG Group_Temperature_LivingRoom "Avg. Indoor Temperature [%.1f °C]" <temperature>

So is there a way to avoid issues like this? Is the way below the best practice?

I have this init rule:

rule "Initialize all items"
when
    System started
then
    logInfo(    "Initializer", "Started Timer ...")
		sendMail("xxxxx@gmail.com","OpenHAB","System started")
        logInfo("Initializer", "... initializing!")

		
		Group_Temperature.allMembers.filter( x | x.state == Uninitialized || x.state == Undefined).forEach[ item |
			item.postUpdate(21)
		]

		Group_SetPoint.allMembers.filter( x | x.state == Uninitialized || x.state == Undefined).forEach[ item |
			item.postUpdate(21)
		]
end