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

[UI Rules] Clarify "Run Now" usage. #1974

Open
Confectrician opened this issue Dec 20, 2022 · 4 comments
Open

[UI Rules] Clarify "Run Now" usage. #1974

Confectrician opened this issue Dec 20, 2022 · 4 comments

Comments

@Confectrician
Copy link
Contributor

The "Run now" button in the main ui overwrites any condition that is configured.
Therefore it shold be clarified how the Ron now button works, to prevent confusion wihle testing rules and especially if their conditions work.

@stefan-hoehn
Copy link
Contributor

As far as I can see the "Run Now" feature is not described anywhere at all except on a sub-page of the blockly reference (https://www.openhab.org/docs/configuration/blockly/rules-blockly-before-using.html) and even there I think it is incorrect ("...to directly run your rule with the trigger").

I would recommend to add what has been written here https://www.openhab.org/docs/configuration/blockly/rules-blockly-before-using.html#creating-a-blockly-rule-via-the-ui to the main rules page https://www.openhab.org/docs/tutorial/rules_basic.html#create-the-rule
and explain that "Run Now" runs the script directly by ignoring any "when" and "but only if" as this does't relate to the script but the rule which can have several scripts.

@rkoshak
Copy link
Contributor

rkoshak commented Mar 14, 2023

Somehow I've forgotten all about this issue. We could have covered it in the new Rules concepts page but didn't. I may have been thinking that it would be covered on a new UI Rules page that would go under Rules which hasn't been written yet.

If we add this to the Rule Concepts page (which makes a lot of sense), I recommend creating a new section between Helper Libraries and Comprehensive Examples titled "Run Now". We can say that it executes the Actions of the rule, ignoring the triggers and conditions. We should also mention that no available variables will be defined inside Script Actions.

I'm also noticing that the Rules Concepts page is missing a section on Scenes, but that's probably best kept for a separate issue.

I'm almost done with the rewrite of my rule templates and updates to my library and plan on diving back into updating the docs. If someone wants to take this on now please have at it. Otherwise I won't forget next time and I'll submit a PR for this at the same time I add a section for Scenes.

@stefan-hoehn
Copy link
Contributor

makes sense to me. btw, I have lately written a full section about the scenes. Have you seen that?
https://next.openhab.org/docs/tutorial/rules_scenes.html

@rkoshak
Copy link
Contributor

rkoshak commented Mar 14, 2023

I saw that. But as a concept we need to cover it in the Rules concepts page too, similarly to how we cover Scripts. I might move/copy that metadata section from Getting Started though as it applies to all rules, not just scenes.

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

3 participants