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
automation: some cleanup #776
Conversation
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
Thanks, looks like a nice clean up and makes the enabled status more consistent indeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I had planned on testing this before merge... but it looks like this does resolve #636. Nice work! |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/preparation-for-2-5m2/75738/1 |
* Updating to reflect changes since OH 2 pre release Adopted the one sentence per line convention used everywhere else in the docs. Rewrote the paragraph discussing the versions of OH 2 available (Release, Testing, SNAPSHOT). NOTE: the Installation Overview needs to be updated as well. Removed discussion of offline and online since I don't think that is correct anymore. There is no mention of different offline/online installs in the installation docs. Tried to make it more clear that the text based instructions are the recommended. Replaces 1.9.0 with 1.x.0 and replaced 2.0 with 2.x to make the instructions not specific to the version. Removed the warnings to create the persistence folder when running in Docker. They are no longer necessary. In necessary changes for Rules, I removed the "core" from the org.openhab imports as there are some users who might be using script imports as well. Removed references to ESHD and changed them to reference VSCode instead. Solves openhab#775 Signed off by Richard Koshak rlkoshak@gmail.com * Changed to use $OPENHAB_CONF and $OPENHAB_USERDATA signed off by Richard Koshak <rlkoshak@gmail.com>
* automation: first cleanup * automation: do not set all enabled rules to idle state Signed-off-by: Markus Rathgeb <maggu2810@gmail.com> GitOrigin-RevId: bafc39f
Cleanup the rule engine implementation by using constructor injection. This allows us to use more final members. Also make some code "nicer looking"
If a rule is added, the status is set dependent on the "disabled storage" (see `addRule) to initializing or uninitialized-disabled.
The old code calls "set enabled" after adding all rules.
This is not necessary at all.
After removing the code my rules are working after an update, so perhaps this is also the root cause for #636 and #746. Sure, this could also just be timing dependent -- we will see.