From 36c744002bfeab9d9f408042477010227d12b2da Mon Sep 17 00:00:00 2001 From: KRKeegan Date: Fri, 14 Dec 2012 22:44:08 -0800 Subject: [PATCH] Insteon fix for update_local_settings Method through an error. Fix bug to correct bad reference. --- lib/Insteon/AllLinkDatabase.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Insteon/AllLinkDatabase.pm b/lib/Insteon/AllLinkDatabase.pm index 63d436edc..31d67c0de 100755 --- a/lib/Insteon/AllLinkDatabase.pm +++ b/lib/Insteon/AllLinkDatabase.pm @@ -645,7 +645,8 @@ sub _on_peek } elsif ($$self{_mem_action} eq 'local_onlevel') { - my $on_level = $self->local_onlevel; + my $device = $$self{device}; + my $on_level = $$device{_onlevel}; $on_level = &Insteon::DimmableLight::convert_level($on_level); $message = new Insteon::InsteonMessage('insteon_send', $$self{device}, 'poke'); $message->extra($on_level); @@ -654,7 +655,8 @@ sub _on_peek } elsif ($$self{_mem_action} eq 'local_ramprate') { - my $ramp_rate = $$self{_ramprate}; + my $device = $$self{device}; + my $ramp_rate = $$device{_ramprate}; $ramp_rate = '1f' unless $ramp_rate; $message = new Insteon::InsteonMessage('insteon_send', $$self{device}, 'poke'); $message->extra($ramp_rate); @@ -2172,4 +2174,4 @@ sub has_link -1; \ No newline at end of file +1;