[RELEASE] [BETA] WATO - When any Attribute Then this cmd Otherwise that cmd

below is my original post from the HE community forum for this app - WATO. after working with automations in the new app … as they stand today … i felt porting this app may be helpful for the community.

ST does not allow selecting from ANY of your devices in the app device selection input. it only allows selecting devices of a specific capability so unlike HE the user will need a specific capability for the device selection list to show for input. only allowed a few capabilities for now.

the intent of the app is simplicity. pick a capability, select a device of that capability and a device attribute from it to match with an user specified value then execute a command on same or different capability and device either on match and/or unmatch.

only tested for presence actions so far to set virtual presence sensor on arrival and departure because ST has chosen not to show phone presence in the new app . so that’s solved now with this … here’s a screenshot of that WATO:

not yet tested executing device commands that require parameters. that obviously works well on HE but will need to work out if any kinks show up in that on ST because of platform differences.

folks on HE use this for a range of simple actions where it may be overkill to use another custom app or automation and/or rules for. hoping folks here on ST will find it equally useful.

save and publish both apps from the IDE but only add the WATO main app from smartapps when creating the first WATO. the WATO child app will be instantiated by the WATO main app for each WATO.

all feedback and feature requests are welcome.

if you would like to donate to support my work … donate here.

thank you.


i was trying to get Rules Machine to check value of any device attribute and trigger an action on match or non-match. didnt find a way to do it. so heres some code that does that.

any device attribute can be compared with an entered value and selected commands can be run either on match or non-match.

the param fields are there for commands that need a parameter to run … like set level on a light.

here is the child app for each new WATO that is defined:

this functionality should probably be embedded in the platform … till then WATO. :slight_smile:

if you would like to donate to support this work … donate here.