[indent]
If Flag Flag01 <> 0 Then
Do _sim_presenca_02 [p0_luz cozinha_off]
Do _sim_presenca_04 [p1_luz cozinha_off]
Do _sim_presenca_06 [p1_quarto susana_off]
Do _sim_presenca_08 [ex_varanda_off]
Do _sim_presenca_10 [ex_jardim suite_off]
Do _sim_presenca_12 [ex_muro circuito 1_off]
Do _sim_presenca_14 [p1_quarto srê conceição_off]
Clear Flag Flag01
End If
[/indent]
The flag is set when the system is armed in vacation mode.
Before this response all the lights in vacation mode remain on after the custemer disarm the system.
If you are using a flag to determine whether in vacation mode before deciding to execute responses or not, wouldn\'t it be easier to set it such that:
If SecurityMode = VacationMode Then
Do _sim_presenca_02 [p0_luz cozinha_off]
Do _sim_presenca_04 [p1_luz cozinha_off]
Do _sim_presenca_06 [p1_quarto susana_off]
Do _sim_presenca_08 [ex_varanda_off]
Do _sim_presenca_10 [ex_jardim suite_off]
Do _sim_presenca_12 [ex_muro circuito 1_off]
Do _sim_presenca_14 [p1_quarto srê conceição_off]
Clear Flag Flag01
End If
Your solution should work then
When you arm to vacation mode, you set the flag by the vacation Mode response
when you disarm you check the flag and control the lights if it is on. That is a good pieve of programming