Help write an Expression to show average values from variable of devices

is it possible you can use:

I use AP to maintain an average of temp and humidity for my dashboard and for use in rules:
image