For one, using a global variable makes the code a lot cleaner when you have many devices you want use. For example, I have a number of door/window contact sensors, and I want to group them all together in Pistons instead of listing 15 contact sensors. Plus if I add more contact sensors, I then have to go edit x number of pistons. PITA. Contact sensor variables work OK now, as I don’t use custom DTH properties. BUT, I have several Ecobee devices that do have a custom DTH. In my code I don’t want to call out all 3 each time I want to perform an action. I just want a thermostat variable I can do whatever I want with.