14.03.2018, 13:16
Code:
script.disable('Valvola_Bagno_Giorno_Automatismo')
termostato_giorno = event.getvalue()
os.sleep(0.2)
if termostato_giorno == true then
grp.write('2/0/8', true) -- valvola bagno giorno
end
os.sleep(10)
script.enable('Valvola_Bagno_Giorno_Automatismo')
Code:
script.disable('Valvola Bagno Notte Automatismo')
termostato_notte = event.getvalue()
os.sleep(0.2)
if termostato_notte == true then
grp.write('2/0/5', true) -- indirizzo valvola bagno notte
end
os.sleep(5)
script.enable('Valvola Bagno Notte Automatismo')
Hi above 2 event based script which works but in the first case script anable and disable does not work. I mean that does not disable the script ('Valvola_Bagno_Giorno_Automatismo'). The name of the script is correct.
I cannot the reason why in the second script I see the resident script ('Valvola Bagno Notte Automatismo') which change its status. In the other case no.
I cannot understand the reason why.
Thanks.