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

update to github with the following change:

Version 5.2.0

*  2019-05-12   added support for contains

@greg not true regex but now supports contains.

@CurtisZM may be try using contains? but right now you only get to use one phrase. but you could set it to contains "No current weather alerts" otherwise turn on the virtual switch.

1 Like

works perfectly, thanks!

1 Like

I'm wondering if this comment is an issue (highlighted in yellow..):

No. When you issue the On command you can't pass any parameters along with that command. It can simply be turned on. Why, what were you trying to pass off to the device along with the on command?

Ryan780

I wasn't trying to pass anything but the ON command. Just turning on the virtual switch. I noticed the statement below and was just asking if I need to worry about it.

No

Thanks Ryan.. Have a good one..

I am still having issues with WATO not triggering a virtual switch. So I recently updated to the latest version of WATO and to simplify I created just 1 WATO to control a virtual switch based on condition_code. Below is what I have setup, but as you can see the condition_code is clearly greater than what I have specified, yet my virtual switch never gets triggered. I also do not see anything in the event logs.




Is condition_code a numeric value or a string? Your WATO rule assumes it is a number, but my guess is it is a string (as there is no math applied to it so it should be a string, not a number). Could it be that it never evaluates to the number 1003 because it is a string value of '1003' ?

Condition_Code is just a numeric value. I tried changing it to text, but the switch was not triggered. Would the attribute need to change at least once before the switch is triggered after I updated the WATO's settings?

I would think so (but I am not positive). It may initialize the initial state as the current value when the rule is created. The trigger is any change, so if it has never changed since the rule was created, then there is nothing to set off the trigger.

So the condition_code changed again but still the virtual switch did not change. There was nothing logged either. The WATO type was set to string this time also. Looping in @bangali for some assistance.

I do see the subscription though in the app, but the virtual switch was not turned on.

I looked through you original screen prints and the only thing that looks odd is the the 'Attribute?' field says 'Condition_code' (with a capital 'C' in Condition) and every other instance it is referenced with a lower case 'c'.

If that is not it .... I am out of ideas.

Yeah but I have to select that attribute, its not like I can actually type it in.

You, sir, are far smarter than I, and likely a better person overall. Thank you for an effort which has already proven to improve my overall Hubitat experience.

@bangali any insight into the issue I am experiencing? Could it be related to the different case as Matthew stated?

no not related to the case difference … that case shift is for display only.

this is strange. did you have logging turned on and nothing got logged from the WATO?

I did but nothing is logged. I also tried recreating the WATO, but same issue.

in that checkAttr function the first thing it does if the log flag is turned on is log the value received from the subscribed event. so its almost as if the subscribed to event is never being received by the WATO.

in the weather device you do have the condition_code set to publish … yes?

I have the radio button on for condition_code which I am guessing is what sets it to publish.

If i go under the events on the WATO I setup there is nothing logged.