-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
[rules] Add event information for time-based and manual/rule-run triggers #286
Conversation
…gers Refs openhab/openhab-core#2965. Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
Hi @florian-h05 sorry about being MIA the last few weeks. Work and life got really busy for me, hoping things calm down at the end of the month and i can start dedicating time to openHAB again. In the mean time, let me read up on the core change and I will give a review shortly. |
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.
LGTM, i'm just upgrading to snapshots today so i might give this a try on my cron based rules.
@digitaldan Have you had the time to test this? |
Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
Hmm, i'm not sure i am actually using this version of openhab.js, hard to tell from my logs (prob need to enable debugging). I have the binding set to "Do Not Use Included Library" and have this branch deployed to node_modules in my automation folder, but i am getting the following output for this test rule: rules.when().cron("1 * * * * ?").then(e => {
console.log(e);
}).build("CRON TEST"); {
"eventClass": "org.openhab.core.automation.events.TimerEvent",
"payload": {
"GenericCronTrigger": "1 * * * * ?"
},
"module": "9d41475f-68cd-4e26-99ad-d130e4db770b"
} Looking through the changes, I would expect to have a |
Hmm, when I tested this it worked fine. I have uses JSRule and manually imported with Have you tried restarting the add-on or openHAB in general? |
Regression of openhab#286. event.getClass() was called even when event was null. Signed-off-by: Florian Hotze <[email protected]>
Regression of #286. event.getClass() was called even when event was null. Signed-off-by: Florian Hotze <[email protected]>
Refs openhab/openhab-core#2965, therefore requires openHAB 4.0 Milestone 4 or newer.