diff --git a/lights b/lights index 9cc38be..e8fd98d 100755 --- a/lights +++ b/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