A system for adjusting an execution of a routine in dependence on a determined state, said routine controlling one or more lighting devices (31-34), said system comprising: at least one receiver , at least one transmitter ; and characterised by at least one processor configured to: - learn, in a learning mode, based on one or more signals received via said at least one receiver , one or more states of one or more portable devices (13-14,34) at a start time associated with said routine for a plurality of executions of said routine over a period of time, - determine, in said learning mode, one or more expected states of said one or more portable devices (13-14,34) at said start time associated with said routine based on said one or more learned states, - determine, in an adjustment mode, via said at least one receiver , one or more current states of said one or more portable devices (13-14,34) at said start time of said routine for a current execution of said routine, - if said one or more expected states have been determined, determine whether said one or more current states differ from said one or more expected states, and - adjust, in said adjustment mode, said current execution of said routine in dependence on a difference between said one or more current states and said one or more expected states, said current execution of said routine comprising transmission of at least one light command via said at least one transmitter . at least one receiver , at least one transmitter ; and characterised by at least one processor configured to: - learn, in a learning mode, based on one or more signals received via said at least one receiver , one or more states of one or more portable devices (13-14,34) at a start time associated with said routine for a plurality of executions of said routine over a period of time, - determine, in said learning mode, one or more expected states of said one or more portable devices (13-14,34) at said start time associated with said routine based on said one or more learned states, - determine, in an adjustment mode, via said at least one receiver , one or more current states of said one or more portable devices (13-14,34) at said start time of said routine for a current execution of said routine, - if said one or more expected states have been determined, determine whether said one or more current states differ from said one or more expected states, and - adjust, in said adjustment mode, said current execution of said routine in dependence on a difference between said one or more current states and said one or more expected states, said current execution of said routine comprising transmission of at least one light command via said at least one transmitter . - learn, in a learning mode, based on one or more signals received via said at least one receiver , one or more states of one or more portable devices (13-14,34) at a start time associated with said routine for a plurality of executions of said routine over a period of time, - determine, in said learning mode, one or more expected states of said one or more portable devices (13-14,34) at said start time associated with said routine based on said one or more learned states, - determine, in an adjustment mode, via said at least one receiver , one or more current states of said one or more portable devices (13-14,34) at said start time of said routine for a current execution of said routine, - if said one or more expected states have been determined, determine whether said one or more current states differ from said one or more expected states, and - adjust, in said adjustment mode, said current execution of said routine in dependence on a difference between said one or more current states and said one or more expected states, said current execution of said routine comprising transmission of at least one light command via said at least one transmitter . <EOS>