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.
if you would like to donate to support this work ... donate here.
FYI going to update this on weekend so it only supports running one command for match and another on unmatch. currently it supports multiple commands which will not work when multiple commands are selected … some of which require a param and the others dont.
I am new in HE and don’t adding anything to my system. Do I just copy and paste these two pieces of code each separately in the New Apps screen? Thanks.
Curious, are there attributes you were missing in RM? Your example of humidity is in RM, assuming that the device driver publishes the capability. The theory for RM has been to support all of the attributes exposed by capabilities. That would leave custom attributes not covered.
Hi. The WATO app 'seems' perfectly suited to help me with my Netatmo devices.
For instance, Netatmo has several attributes not currently supported by RM such as rain, rainsumday, rainsumhour, wind etc...
There have been other threads where I have asked to see whether RM could support these attributes. I also asked that perhaps Weather Switch could support these attributes.
You all (at HE) have made a very reliable product and I understand how busy you have been so the fact that RM did not support these attributes was barely an inconvenience, but your point is well reasoned that were RM to support any attribute then YIPPEE and WATO would be somewhat redundant.
We have to draw the line somewhere. We have tried to maintain a semblance of reasonably complete coverage for capabilities and associated attributes. Given the opportunity for user created / shared drivers that have custom attributes, that line seems like it's drawn in a reasonable place. So, something like WATO is a great way for the community to support itself. With the passage of time, no doubt more custom attributes will find there way into being supported.
just fyi folks … planning to clean up a few things this weekend and release a new version:
support only one command to be run for each ie one for match and another for un-match.
-- if you want multiple commands to be run on a single condition just create multiple WATOs.
support commands with multiple params - like setLevel(level, seconds).
allow the same command to be selected for match and un-match
-- if you want the lights to turn red when its >= 78 outside and green when its < 78 that will work.
dont create too many WATOs till new version is out. but feel free to try this version and give me feedback.