13.09.2023, 07:44
This logic part is wrong: 19 <= hour and hour <= 7
Another issue with this script is that if the input object value is false it will first write 70 then 0 to the output. This can cause the light to flicker.
Corrected version (event script, as it should be):
Another issue with this script is that if the input object value is false it will first write 70 then 0 to the output. This can cause the light to flicker.
Corrected version (event script, as it should be):
Code:
value = event.getvalue()
if value then
hour = os.date('*t').hour
if hour <= 7 or hour >= 19 then
out = 10
else
out = 70
end
else
out = 0
end
grp.checkwrite('1/4/30', out)