Rules - Math issue I can't get my head around

Because you are using "Wait for event," a new reading (event) will need to be come in that matches the criteria for your wait. It appears to be 0 at this moment, and without a new reading come in, you will indeed be stuck at "Wait for event."

Switching to "Wait for condition" would handle this case--if it's already below 10, the rule will keep going--but it's generally recommended to use "Wait for event" if you can. I suspect in regular use, you could; the device would probably be in use and generating readings, so it's likely just your test now that is messing with you. But whatever works for your use case!

I'll create another new rule from scratch and PAUSE this one as it is not working.

***** Noticed something else, I thought it was me but it takes multiple clicks on the Device OFF button to actually register on the Device Events.

Just did a check - clicked OFF button 25 time with a 1 second delay between each press - it ignored the first 18 clicks and registered the remaining 7 clicks.

ZWAVE details shows the Device is communicating at 100kbps

It looks ok to me.

It is using the Hubitat built in Driver

Just tested it again and now it is extremely responsive - instantly responds to clicks

So not sure why getting issues with it.

No the Power drops from 23.47w at 17:28 to 12.78 at 17:33 wouldn't that new reading at 17:33 be classified as a new event?

I am pretty sure that 12.78 <= 20 so would expect it to Turn off switch when the Power level dropped from 23.47 to 12.78 ?

Ok I need to do a lot more testing with this before I can let it manage turning things on or off.

Will do some isolated testing and return here.

I'd do some more testing (I did miss that event in the screenshots), but one thing that could also be affecting this: any time you hit "Done" or "Update Rule" (basically the same except it doesn't close the rule), existing waits and schedules are also cleared. You can modify the rule and just leave it as-is without hitting either of these, or just keep mind mind that these will also start with a clean-ish slate. Sometimes these are things people do when testing or editing rules, so I figure I'd mention it.

If your plug takes multiple "off" commands to actually turn off, that is a separate issue. I'm not sure what that could be, but nothing really stands out to me except maybe the large number of route changes the device has experienced (which could be poor signal, but it appears to have multiple neighbors and a fast connection to the hub so :man_shrugging:).

I suspect the route changes are because I had to replace the Tool Charger Greenwave with a neo cool cam plug because the Greenwave Power is reported in string.

Using local variables, you can convert a string into a decimal and go back to the Tool Charger Greenwave.

Actions:
Set PowerString to Tool Charger Greenwave power - or whatever the attribute is
Remove ' W' from PowerString
Set PowerDecimal to %PowerString% as decimal

Variables:
PowerString - type string
PowerDecimal - type decimal

You can use PowerDecimal in your conditional statements.

1 Like

Cool I’ll try that.