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] SwitchableJSRule: Add option to specify name of Switch Item #325

Merged
merged 5 commits into from
Mar 24, 2024

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Mar 24, 2024

This adds an option to the rule config for SwitchableJSRule to specify the name of the Switch Item, which enables and disables the rule.
If no switchItemName is provided, the Item name will be generated as before.
If the switchItemName is specified but no Item with the specified name exists, an Item with that name is created, else the existing Item with this name is used.

BREAKING CHANGE: It also changes Item.type to not include the Item suffix, i.e. SwitchItem now is just Switch.

@florian-h05 florian-h05 requested a review from a team as a code owner March 24, 2024 23:45
@florian-h05 florian-h05 added the enhancement New feature or request label Mar 24, 2024
@florian-h05 florian-h05 added this to the to be released milestone Mar 24, 2024
@florian-h05 florian-h05 merged commit 6ac82b1 into openhab:main Mar 24, 2024
3 of 4 checks passed
@florian-h05 florian-h05 deleted the switchable-jsrule-item branch March 24, 2024 23:47
@florian-h05 florian-h05 changed the title [rules] SwitchableJSRule: Add ability to specify name of Switch Item [rules] SwitchableJSRule: Add option to specify name of Switch Item Mar 24, 2024
florian-h05 added a commit to florian-h05/openhab-js that referenced this pull request Apr 11, 2024
Add missing release note for breaking change from openhab#325.

Closes openhab#327.

Signed-off-by: Florian Hotze <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant