small bug fix
This commit is contained in:
parent
2fa35e873a
commit
d716976109
1 changed files with 4 additions and 4 deletions
8
lights
8
lights
|
|
@ -57,15 +57,15 @@ else
|
|||
temp: setting.to_i,
|
||||
brightness: brightness.to_i,
|
||||
}
|
||||
if transition
|
||||
# tenths of a second
|
||||
attrs[:transitiontime] = transition.to_i
|
||||
end
|
||||
if attrs
|
||||
attrs[:bri] = attrs.delete(:brightness)
|
||||
if attrs[:temp]
|
||||
attrs[:ct] = kelvin_to_mireds(attrs.delete(:temp))
|
||||
end
|
||||
if transition
|
||||
# tenths of a second
|
||||
attrs[:transitiontime] = transition.to_i
|
||||
end
|
||||
lights.each do |l|
|
||||
l.send(:set!, attrs)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue