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.
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 noswitchItemName
is provided, the Item name will be generated as before. If theswitchItemName
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 justSwitch
.