Virtual Sensors...

A while back, there was a topic on virtual sensors that I can’t find. My OpenLuup box crashed and took it’s secrets with it. There was some code posted to extract a variable from one device and update a virtual device variable, but I can’t find it again. Anyone happen to know the easy way to do it? It wasn’t in a scene, or at least I don’t believe it was… Thanks in advance…