Trouble triggering off of dimmer

This is indeed possible.

Put 0 in the “state” field of the trigger.

If you want something more elaborate (e.g. only trigger the rule when the Dimmer goes above 50, use the “but only if…” section.

Please How to use code fences even for posting JSON formatted code like this.

Also, please review the docs that have been started for the NGRE linked to above. But realize it is labeled “Experimental” for a reason. I’m probably the foremost expert on it who contributes on this forum (at least when it comes to creating Rules through PaperUI) and I don’t know near enough yet to use it well. Those docs are it. If the answer isn’t there you may be on your own.

That being said, your Item is a dimmer but you are trying to trigger the Rule using ON/OFF. You can’t do that (yet?) in NGRE. You have to use state: 0 and not use previous state to make this work as written.

As stated above Dimmers store their state as a Number, not ON/OFF.

You can achieve the previousState: OFF part if you use the but only if condition to test for that. But you can’t do it from the trigger itself.

OH does not watch the JSONDB files and load them on changes. It will only reload them on a restart of OH. But when OH closes nicely, it writes out its internal state to the JSONDB (I think). So it probably overwrote your manual change to the JSONDB.

You must stop OH before making any manual changes to the JSONDB.

This part is a little broken. There are a few enum type commands listed but for everything else you need to manually type in what you want.

1 Like