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)