Skip to content

Commit

Permalink
Merge pull request #481 from cengel74/web_floorplan_fixes_v4
Browse files Browse the repository at this point in the history
Fixes for web floorplan view
  • Loading branch information
hollie committed Mar 2, 2015
2 parents 166950b + 6b0518c commit 6612f9a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Generic_Item.pm
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ TODO

sub get_fp_location {
my ($self) = @_;
if (! @{$$self{location}} ) { return }
if (! defined @{$$self{location}} ) { return }
return @{$$self{location}};
}

Expand Down
11 changes: 10 additions & 1 deletion web/bin/floorplan.pl
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,14 @@ sub web_fp_item #render all items based on type
$p_obj->isa('Weeder_Light') or
$p_obj->isa('UPB_Device') or
$p_obj->isa('Insteon_Device') or
$p_obj->isa('Insteon::DeviceController') or
$p_obj->isa('Insteon::BaseLight') or
$p_obj->isa('UPB_Link') or
$p_obj->isa('EIB_Item') or
$p_obj->isa('EIB1GItem') or
$p_obj->isa('EIB2_Item') or
$p_obj->isa('EIO_Item') or
$p_obj->isa('UIO_Item') or
$p_obj->isa('Generic_Item') or
$p_obj->isa('X10_Item')
) {
if ($p_obj->state eq 'off') {
Expand Down Expand Up @@ -252,6 +253,14 @@ sub web_fp_item #render all items based on type
} elsif ($p_obj->isa('iButton')) {
$l_text=web_fp_filter_name($p_obj->{object_name});
$l_text.=':' . $p_obj->read_temp();
} elsif ($p_obj->isa('Generic_Item') ) {
if ($p_obj->state eq 'off') {
$l_image='fp-light-off.gif';
$l_state='on';
} else {
$l_image='fp-light-on.gif';
$l_state='off';
}
} else { #Unknown object
$l_text=web_fp_filter_name($p_obj->{object_name});
$l_text.=':' . $p_obj->state();
Expand Down

0 comments on commit 6612f9a

Please sign in to comment.