Multi sensor Temperature average with scheduled & change based updates

average
temperature
variables

#1

This piston takes 2 sensors in a room and averages them together, then pushes that temperature to a generic virtual temperature sensor in ST

It takes both devices’ temps and assigns them to variables.
It averages them, then sets average variable.
That variable exports to virtual temperature sensor

It is set up update/poll after 30 min without change from either sensor, OR if either sensor changes and reports on its’ own. Basically any change updates, or with no temp change, it still tries to refresh and update.

This can be replicated to work as many sensors as you want.
See example below where all of the floor’s sensors average together.
In this example, 2 bedrooms have 2 sensors each, so it takes the avg temp from the room, rather than the individual sensors.

Both only run the updates when someone is home. This is done during certain modes. (modes are all set based on a mode setting piston)


#2

I’m hoping you still read the forums! I’m trying to get the average temp to spit out to the virtual temp sensor but its not receiving a value. After the piston ran its gave me a value of true. Any help would be greatly appreciated.


#3

If the value is “true”, then you must have the variable type, set as Boolean, not integer or decimal. Check that first.