Feature request: Device local/global variable expose all DTH commands


#1

Just wanted to up vote a suggestion from this thread:

I like to use global/local variables to control multiple devices, but when I do that not all DTH commands are exposed. Specifically, I use the paid Ecobee DTH and have 3 Ecobees that I want to control at once.


#2

Thanks for bumping my suggestion, your $5 is in the mail :stuck_out_tongue_winking_eye:


#3

Send the $5 to the WebCoRE guys once they implement the feature. :slight_smile:


#4

The problem is a bit complex. Subscribing to devices at run time is one thing (whatever devices are in the variable at that time…). Listing custom commands at build time is something else - it’s a variable, it can change - by all means it can be done, the only problem is figuring out what’s wrong when what you expect won’t happen. But why use a global variable to contain a list of devices that may never change? Do you change that list often? And if you do, you’d have to edit the piston to resubscribe to new devices, which beats the purpose, doesn’t it?


#5

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.


#6

But that is my point. Setting up a piston using such a variable and then changing the variable will not automatically have the piston subscribe to the new list of devices. You would still have to either pause/resume or edit/save the piston. Subscription happens at start/resume time, so you have to force that to happen in each piston. Same PITA… except you only change the list once.


#7

Hmm then I’d put in a feature request that whenever a device variable changes, that the effected Pistons are automatically updated to subscribe to the new devices. My assumption (which was obviously wrong) is that the subscriptions would be updated when the variable list contents changed.