From 3abb3d94552dc0cc58440c6d5d427ec5d93f5718 Mon Sep 17 00:00:00 2001 From: hplato Date: Sun, 6 Apr 2014 11:04:47 -0600 Subject: [PATCH] modified: lib/X10_Items.pm --- lib/X10_Items.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/X10_Items.pm b/lib/X10_Items.pm index 343a560b8..76ee79559 100644 --- a/lib/X10_Items.pm +++ b/lib/X10_Items.pm @@ -76,7 +76,6 @@ Since this item is inherits from Generic_Item, you can use the set_with_timer me set_with_timer $watchdog_light '20%', 5 if file_unchanged $watchdog_file; - =head1 DESCRIPTION =head1 INHERITS @@ -243,6 +242,7 @@ sub set_interface { } elsif ( defined $interface_object and $interface_object->isa('Insteon_PLM')) { print "[X10] for id $id, x10 interface supplied ($interface) and supported by an Insteon PLM\n" if $localDebug; $self->{interface} = $interface_object; + $self->{interface}->add($self); } else { # we can't find a real interface, so use a Dummy_Interface print "[X10] warning, using dummy interface for id $id and supplied interface $interface\n" if $localDebug; @@ -1536,8 +1536,12 @@ sub init { # Note: name is require, as $self->{object_name} is not # set yet on startup :( sub new { - my ($class, $id, $name, $type) = @_; - my $self = X10_Item->new(); +## my ($class, $id, $name, $type) = @_; +## my $self = X10_Item->new(); + my ($class, $id, $name, $type, $interface) = @_; + print "[X10_Sensor] class=$class, id=$id, name=$name, interface=$interface\n" if $main::Debug{x10}; + my $self = X10_Item->new($id, $interface, $type); + $$self{state} = ''; bless $self, $class;