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

automation: some cleanup #776

Merged
merged 2 commits into from May 1, 2019
Merged

automation: some cleanup #776

merged 2 commits into from May 1, 2019

Conversation

maggu2810
Copy link
Contributor

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.

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
@davidgraeff
Copy link
Member

Thanks, looks like a nice clean up and makes the enabled status more consistent indeed.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kaikreuzer kaikreuzer merged commit bafc39f into openhab:master May 1, 2019
@maggu2810 maggu2810 deleted the automation branch May 2, 2019 04:43
@5iver
Copy link

5iver commented May 2, 2019

I had planned on testing this before merge... but it looks like this does resolve #636. Nice work!

@openhab-bot
Copy link
Collaborator

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

@wborn wborn added this to the 2.5 milestone Jul 30, 2019
Rosi2143 pushed a commit to Rosi2143/openhab-core that referenced this pull request Dec 26, 2020
* 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>
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
* automation: first cleanup
* automation: do not set all enabled rules to idle state

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
GitOrigin-RevId: bafc39f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants