add 'midnight' preset to lights and flux

This commit is contained in:
Sami Samhuri 2015-05-28 13:09:34 -07:00
parent 05d27f1983
commit c6acac3e86
2 changed files with 6 additions and 0 deletions

2
flux
View file

@ -35,10 +35,12 @@ def flux(options)
month = date.month.to_s
day = date.day.to_s
if times = TIMES[month][day]
times['midnight'] = '22:30'
puts "sunrise: #{times['sunrise']}"
puts "morning: #{times['morning']}"
puts "sunset: #{times['sunset']}"
puts "night: #{times['night']}"
puts "midnight: #{times['midnight']}"
time = Time.now
hour, min = time.hour, time.min

4
lights
View file

@ -32,6 +32,10 @@ TEMPS = {
brightness: 160,
temp: 2200,
},
'midnight' => {
brightness: 80,
temp: 1200,
},
}
TEMPS['sunny'] = TEMPS['bright']
TEMPS['overcast'] = TEMPS['cloudy']