Can we compare values from two devices?

I am wondering, if its possible somehow, to compare values of two devices, and do something upon the result?

Like if device1.temperature<20 then device2.switch = On…

I was thinking about some virtual device variable, and bind it to a device state, but it doesnt help, as I cant
compare this value in any field, or can i?

Multidata triggers checks the condition of 2 or more devices and when all device states are true based on the conditions you define then the trigger is activated which can be turning on or off another device.

Thanks, i will try it