From d716976109e17a0caf74fc65e5f3713d2fbe1977 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Tue, 23 Dec 2014 09:55:41 -0800 Subject: [PATCH] small bug fix --- lights | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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