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,
|
temp: setting.to_i,
|
||||||
brightness: brightness.to_i,
|
brightness: brightness.to_i,
|
||||||
}
|
}
|
||||||
if transition
|
|
||||||
# tenths of a second
|
|
||||||
attrs[:transitiontime] = transition.to_i
|
|
||||||
end
|
|
||||||
if attrs
|
if attrs
|
||||||
attrs[:bri] = attrs.delete(:brightness)
|
attrs[:bri] = attrs.delete(:brightness)
|
||||||
if attrs[:temp]
|
if attrs[:temp]
|
||||||
attrs[:ct] = kelvin_to_mireds(attrs.delete(:temp))
|
attrs[:ct] = kelvin_to_mireds(attrs.delete(:temp))
|
||||||
end
|
end
|
||||||
|
if transition
|
||||||
|
# tenths of a second
|
||||||
|
attrs[:transitiontime] = transition.to_i
|
||||||
|
end
|
||||||
lights.each do |l|
|
lights.each do |l|
|
||||||
l.send(:set!, attrs)
|
l.send(:set!, attrs)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue