I love that Rooms are available in Webcore! I have tons of new logic ideas I want to work on, but how do I parse this $rooms variable in an expression? I've tried a few things with RegEx, but I feel it should be easier and I'm missing something.
An example would be like I want to send a dimmer level command to all devices in a specific room.
Another would be I want to populate a local device variable in a piston with all devices that have a specific attribute or capability in a Room.
Specifically, that would the formatting look like for a condition expression where if room equals 3 for example, set level to 40% for all devices in that room?
I don't think the $roomids or $rooms variables are going to serve your purpose well, if at all. One obvious problem is that these two system variables do not provide any information about device capability. So identifying just "dimmers" isn't possible without further effort.
It seems to me that it would be easier to explicitly define the devices you want to command, either in a statement within the body of the piston, as a device variable at the top, or even as a global variable like @kitchenDimmers,
If, however, you're determined to explore "rooms" further, here's a start on the syntax,
Really appreciate this, thank you! The devices I want to capture all have the word Bulb in the name so I’ll add a RegEx to grab them that way. Device Types (switch,dimmer,bulb,outlet,etc) and device capabilities in triggers and conditions has always been a big wish list item for me with WC. I love the concept of having pistons that just work without having to define a specific device or devices. I’ll post the snapshot of the finished product when I’m done with it. I tried to move away from WC when I switched from SmartThings to Hubitat, but I’ve been moving back again just because of how powerful it is even compared to RM.
So in theory though could I grab one or all of those device IDs using a Set Variable and have a local device variable that converts it to the actual device?