Can someone help me with the logic of this Lua code...
Code: Select all
If timeofday[‘Nighttime’] then
If time.hour < 7 then
commandArray[‘light’] = “On”
end
end
My logic is wrong though as 23 is higher then 7 so my if statement will fail. I didn’t want to put a set hour in my if statement like this:
Code: Select all
If time.hour > 18 and time.hour < 7
Many thanks.