From 019082f14bcf39c3fea2878af7969fa38398f8f9 Mon Sep 17 00:00:00 2001 From: KRKeegan Date: Tue, 26 Mar 2013 21:20:19 -0700 Subject: [PATCH] Insteon::DimmableLight Fix convert_level to return FF for 100% 100% was being converted to FE when it should be FF. Fixes Issue #147 --- lib/Insteon/Lighting.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Insteon/Lighting.pm b/lib/Insteon/Lighting.pm index 931530349..8e8e80a70 100755 --- a/lib/Insteon/Lighting.pm +++ b/lib/Insteon/Lighting.pm @@ -107,6 +107,7 @@ sub convert_level my ($on_level) = @_; my $level = 'ff'; if (defined ($on_level)) { + $on_level =~ s/(\d+)%?/$1/; if ($on_level eq '100') { $level = 'ff'; } elsif ($on_level eq '0') {