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

[rules] EventObject: Add missing property & Make all properties string #125

Merged
merged 5 commits into from
May 30, 2022

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented May 28, 2022

This PR fixes #124.

Enhancements

  • JSRule execute callback: Allow access to raw Java input.
  • event object: Make all properties typeof string.
  • Document both callback and event object in JSDoc.

Possible breaking changes

  • The receivedCommand property of the event object is now typeof string, before it was the raw Java command type.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes [Docs] File Based Rules/Event Object types are incorrect openhab#124.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 added documentation Improvements or additions to documentation enhancement New feature or request labels May 28, 2022
@florian-h05 florian-h05 requested a review from digitaldan May 28, 2022 13:28
@florian-h05 florian-h05 added this to the 1.2.4 milestone May 28, 2022
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the rules-improvements branch from 2d2a47e to 45b8012 Compare May 29, 2022 14:18
Instead add `command` from PWM trigger to the event object.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the rules-improvements branch from 45b8012 to 61de3e4 Compare May 29, 2022 14:19
@florian-h05 florian-h05 requested a review from digitaldan May 29, 2022 14:24
@digitaldan
Copy link
Contributor

LGTM, thanks!

@digitaldan digitaldan merged commit 5b310b0 into openhab:main May 30, 2022
@florian-h05 florian-h05 deleted the rules-improvements branch May 30, 2022 15:57
@florian-h05 florian-h05 changed the title [rules] Improvements for event object & JSRule callback [rules] EventObject: Add missing property & Make all properties string May 31, 2022
florian-h05 added a commit to florian-h05/openhab-js that referenced this pull request Jun 6, 2022
Fixes an issue that I introduced in openhab#125.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
digitaldan pushed a commit that referenced this pull request Jun 9, 2022
Fixes an issue that I introduced in #125.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] File Based Rules/Event Object types are incorrect
2 participants