Copying "Ceiling Height Offset From Level" to a Room Parameter

Continuing the discussion from Ceiling height to room parameter:

Good morning folks,
Actually, i’m trying to extract “Ceiling Height Offset From Level” for each ceiling, and push those value in a Room_Parameter called “H.SOUS PLAFOND”.
The problem is the Room_Parameter is filled but not with the correct value.

NOTA: I have some rooms they don’t have any ceiling only floor of the level above.”

Is there any solution to fill Room_Parameter with the correct value corresponding to the Ceiling Height Offset From Level for each room ?

Thank you in advance for your help.

Script designed by: @john_pierson

The graph seems to be correct but, just to be sure, are the number of items inside of the “List.Flatten” node the same amount of the rooms (in “All Elements of Category” node)?