2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00
55_GDS: changed GDS_Undef
contrib/55_InfoPanel: changed btIP_Undef

git-svn-id: https://svn.fhem.de/fhem/trunk@7794 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-01-31 12:50:35 +00:00
parent 8e1a0b8458
commit 761f00a17d
2 changed files with 10 additions and 8 deletions

View File

@ -131,15 +131,8 @@ sub GDS_Undef($$) {
my ($hash, $arg) = @_;
my $name = $hash->{NAME};
RemoveInternalTimer($hash);
# check if last gds device
my $url = '/gds';
my $gdsPresent = 0;
foreach my $def (sort keys %defs) {
$gdsPresent += 1 if($defs{$def}{TYPE} eq "GDS");
last if $gdsPresent == 2;
}
# if last gds device, remove FWEXT
$data{FWEXT}{$url} = undef if $gdsPresent == 1;
$data{FWEXT}{$url} = undef if int(devspec2array('TYPE=GDS')) == 1;
return undef;
}

View File

@ -78,6 +78,7 @@ sub btIP_getURL;
sub InfoPanel_Initialize($) {
my ($hash) = @_;
$hash->{DefFn} = "btIP_Define";
$hash->{UndefFn} = "btIP_Undef";
#$hash->{AttrFn} = "btIP_Attr";
$hash->{AttrList} = "autoreload:1,0 bg bgcolor refresh size title tmin";
$hash->{SetFn} = "btIP_Set";
@ -108,6 +109,14 @@ sub btIP_Define($$) {
return undef;
}
sub btIP_Undef($$) {
my ($hash, $arg) = @_;
# check if last device
my $url = '/btip';
$data{FWEXT}{$url} = undef if int(devspec2array('TYPE=InfoPanel')) == 1;
return undef;
}
sub btIP_Set {
my ($hash, @a) = @_;