Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

was_greater_than issue? #29

Open
popepay opened this issue Oct 1, 2017 · 1 comment
Open

was_greater_than issue? #29

popepay opened this issue Oct 1, 2017 · 1 comment

Comments

@popepay
Copy link

popepay commented Oct 1, 2017

Hello,

I have been trying to port my pistons from Core to Webcore. Most work, however I cannot get the device power readings to work correctly. See below

The condition I have is:

Washing Machine's power was greater than 10W for 1min

this evaluates to (in the log):

Comparison (decimal) 16.3 was_greater_than (decimal) 10.0 = false (42ms)

Which should evaluate to true, not false.

Any help appreciated.

screen shot 2017-10-01 at 2 49 28 pm

@idpaterson
Copy link
Collaborator

I believe that the was greater than condition evaluates to true when the power was greater than 10W for 1 minute but has now become less than 10W. For the code above it looks like you would be better off with the stays greater than trigger, you can read more about conditions and triggers for additional insight.

I recently set up a piston using was with a contact sensor. I wanted a notification when the contact opened, but only if it had been closed for at least a minute prior to avoid a bunch of notifications while I reset the device (a classic rat trap with a magnet for the Z-Wave contact sensor). The piston uses changes as the trigger but then filters that event based on the was condition:

screen shot 2017-10-02 at 1 59 06 pm

Were you able to get into the forum? (#28) There are plenty of people there to help with any additional questions you may have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants