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

Set custom rules ID via @rule annotation #12

Open
fex01 opened this issue May 16, 2021 · 0 comments
Open

Set custom rules ID via @rule annotation #12

fex01 opened this issue May 16, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@fex01
Copy link

fex01 commented May 16, 2021

As posted in openHAB's community forum, I would like an option to replace the random auto-generated rule IDs with custom IDs defined by the user.

According to @CrazyIvan359 that should be possible (forum):

To anyone interested in adding this: there is a UUID validation function in utils.py already. You would need to add a parameter to the rule function and run that through the validator, accounting of course for it not being supplied or an invalid value being supplied.
I can add this but I don’t know when I will have time right now, but if someone submits a PR tested on OH2 and OH3 then I can pop over and approve it.

I just got started with Python in general and Jython rules in the specific - so it might take some time until I feel comfortable enough with the Helper-Libraries to contribute. But I'm not saying no 😅
But I would also not be sad if someone else solves that issue in the meantime 😁

@fex01 fex01 added the enhancement New feature or request label May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant