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

The one above is for a number attribute, and the one below is for a string attribute. Which is it? Is there only one "condition_code" attribute for this device or two?

Hmm. Looking at the driver code, I only see one condition_code and it is a string

So its a bit of a mystery why it sees it as a number attribute. Were your two screenshots back to back? What was the sequence of events for getting these screenshots?

They were back to back. First one- Created new trigger, selected capability 'custom attribute', selected device, selected 'condition_code' and was presented with all comparisons.
Then, went back to Apps list, created a new trigger with same selections and was presented with results in second screenshot. If it makes any difference, I did not cancel or remove the first trigger before starting the second attempt.

Weird.

Does the line of code that defines the attribute look like this:

    attribute    "condition_code", "STRING"

Yes, except "string" is in lower case . does that make a difference? I've tried reproducing about a half dozen times and was successful once. I clicked on the box to select a comparison and clicked it again without selecting one. The text input disappeared. Then I clicked on comparison again and was given the option for number attributes. It's not consistent, though.

I created 3 different rules/triggers and cannot get the number attributes or the additional comparison options to come up at all. It always displays just the 4 options "=, !=, contains, and changed, never anything else.

Edit: Now I noticed if I choose a different device that is not the "APIXU" weather driver I do see the additional options. This seems to be affecting the APIXU device only maybe?

It seems that is the correct behavior for "string" attributes. I guess we would need to see if @bangali can do anything with the APIXU driver.

Yeah RM needs to recognize it as a number, otherwise we do not get the options.

Wait now it just appeared like you said, I created a new rule and let it sit at the custom attribute screen and when I came back it and the options were there, weird.

1 Like

Thank you. I wouldn't want @bravenel thinking I was crazy!:crazy_face:

@bravenel I also did find a bug after all this testing though. If you select a custom attribute and then don't select an option and then try to select another device you get the following error.

You can't recognize a string attribute as a number. It would need to be a number attribute. Why it's coming up number sometimes and not string is a mystery.

I'm not able to reproduce this, so please be much more specific about the steps and/or show screenshots.

Ah, never mind, I found a way to cause it.

Bug fixed...

2 Likes

Hi, I am seeing an error when I try to edit a WATO child app, the error is

"javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake (initialize)"

I tried to remove the app but it still errors. Can you help?

Thanks

You do not need to use WATO anymore. Rule machine can be triggered off of any device attribute or use any attribute as a condition.

Thanks for that but I am trying to do just that. I cant remove the code as it says its in use by 2 apps I have created and I can't remove the apps because of this "Unexpected Error" above. So I am in a catch 22. How can I get rid of them?

Click on the cog wheel next to the app and that will bring you to the properties page. This will allow you to remove them via the button at the bottom.

Thank you so much - All Done

1 Like

YAY! Glad you got it.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.