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

triggers. every time the device publishes the attribute it will be evaluated and either the match or unmatch (when both are present) command executed.

the restrictions work as conditions.

sounds like you are looking for rises above and drops below:

:exploding_head::exploding_head::exploding_head:. Wonderful!!

1 Like

Any idea when this will be added?

wasnt planning to till the weekend … but since you asked … pushed to github. :slight_smile:

This rule isn't working for me.

WHEN [Local Weather] ATTRIBUTE wind_mph > 10 THEN [Outside Decorations, Outside Decorations 2] : off

Currently wind_mph is 11.9 and my inflatable decorations are still on. I never see any log entries for WATO, so to me it looks like nothing is happening.

please update the WATO child app to the latest code … save the WATO again and check please.

It doesn't like the decimal I think:

[app:2200](http://10.0.1.46/logs/past#app2200)2018-10-26 13:52:35.536 error java.lang.NumberFormatException: For input string: "12.5" on line 264 (checkAttr)

[app:2200](http://10.0.1.46/logs/past#app2200)2018-10-26 13:52:35.371 debug  checkAttr: name = wind_mph | value = 12.5

[app:2200](http://10.0.1.46/logs/past#app2200)2018-10-26 13:22:33.466 error java.lang.NumberFormatException: For input string: "12.5" on line 264 (checkAttr)

[app:2200](http://10.0.1.46/logs/past#app2200)2018-10-26 13:22:33.399 debug  checkAttr: name = wind_mph | value = 12.5

have you selected the attribute type as decimal?

i tested this a bit earlier … it did work:

DOH! I didn't see that. I am testing it now.

1 Like

Does this app treat each rule like a trigger or does it just match the condition? Our wind is 12.9 right now and I see nothing happening in the logs. The switches are also still on.

go to the weather device for the wind value and trigger a refresh which should publish the wind value again causing the WATO to trigger.

yes its always a trigger. polling the devices would be too costly and not trigger as soon as the change in value happens.

normally this would not be required.

1 Like

YUP!!! Worked Perfectly!

1 Like

btw if you setup that WATO with rises above 10.0 then specify the off command in the then section and the on command in the otherwise section then it will also turn on the decorations when wind falls below that value.

1 Like

Won't the same thing work with the ">" option? As soon as it's not greater than turn on?

yes it will.

except > will trigger the on/off every time the wind value is published by the weather driver. rises above and falls below only triggers the command when it rises above or falls below specified value.

it will still work with > … this is just an optimization. :slight_smile:

rise above throws this error:

2018-10-26 16:13:10.002:errorjava.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String on line 294 (checkAttr)

arent you glad you tried it? :wink:

sorry … checking.

please update the WATO child app code and give it a try.

WOOT! It works

1 Like