Code: Select all
commandArray{}
if time > Sunset or time < Sunrise and
otherdevices['Corridoio'] == 'Off'
or otherdevices['Lampada Sala'] == 'Off'
or otherdevices['Faro Retro'] == 'Off'
or otherdevices['Faro Garage'] == 'Off'
or otherdevices['Lanterna Ingresso'] == 'Off'
or otherdevices['Lanterna Nonna'] == 'Off'
or otherdevices['Accento Ingresso'] == 'Off'
or otherdevices['Lampione'] == 'Off'
or otherdevices['Luce Garage'] == 'Off'
then
commandArray['Corridoio'] == 'On'
commandArray['Lampada Sala'] == 'On'
commandArray['Faro Retro'] == 'On'
commandArray['Faro Garage'] == 'On'
commandArray['Lanterna Ingresso'] == 'On'
commandArray['Lanterna Nonna'] == 'On'
commandArray['Accento Ingresso'] == 'On'
commandArray['Lampione'] == 'On'
commandArray['Luce Garage'] == 'On'
elseif time= Sunrise commandArray[group:Luci Notturne] == 'Off'
end
return commandArray