[SOLVED] Rule Refactor?

Is it possible to refactor this rule

rule "React on On/Off Autolock Doors changes (omnilink_flag_9ffcfafd_397_switch) change/update"

when
Item omnilink_flag_9ffcfafd_397_switch changed from OFF
then
MF_AutoDoorLocking_Indicators.sendCommand (ON)
end

rule “React on On/Off Autolock Doors changes (omnilink_flag_9ffcfafd_397_switch) change/update”

when
Item omnilink_flag_9ffcfafd_397_switch changed from ON
then
MF_AutoDoorLocking_Indicators.sendCommand (OFF)
end

rule "React on On/Off Autolock Doors changes (omnilink_flag_9ffcfafd_397_switch) change/update"
when
    Item omnilink_flag_9ffcfafd_397_switch changed
then
    if (previousState == NULL) return;
    MF_AutoDoorLocking_Indicators.sendCommand(triggeringItem.state)
end
1 Like

Awesome - thank you.