Tried everything on the forum but nothing is working. Any ideas on how to achieve this? I tried most methods and best I got so far was with custom Device Handle and Child/Parent app. All works but the value never updates the temp reads 0.
If you only have a simple, single or few manually created “Virtual Temperature Device” instances, then the simplest solution is to just add a trivial SmartApp that subscribes to your source device(s) and runs a Command on the Virtual Device to have it update it’s own Temperature Attribute.
Can you describe your full real-world use case in more detail?
I’ve done this before by creating a virtual temperature device and a SmartApp that let’s you use 1 or many physical devices (which averages them).
Here’s the code for the virtual device:
Here’s the SmartApp:
Create your virtual device first, and then install the app. This worked for me for years. As soon as any of the physical device(s) updated the temp reading, the virtual would update as well.
You are right this method works. I just needed to wait a couple of hours for it to update.