55_GDS.pm: prevent problems after global rereadcfg
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@9794 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -318,6 +318,7 @@ sub GDS_Undef($$) {
|
|||||||
sub GDS_Shutdown($) {
|
sub GDS_Shutdown($) {
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
RemoveInternalTimer($hash);
|
||||||
Log3 ($name,4,"GDS $name: shutdown requested");
|
Log3 ($name,4,"GDS $name: shutdown requested");
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@@ -326,7 +327,8 @@ sub GDS_Notify ($$) {
|
|||||||
my ($hash,$dev) = @_;
|
my ($hash,$dev) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
return if($dev->{NAME} ne "global");
|
return if($dev->{NAME} ne "global");
|
||||||
return if(!grep(m/^INITIALIZED|^REREAD/, @{$dev->{CHANGED}}));
|
my $type = $dev->{CHANGED}[0];
|
||||||
|
return unless (grep(m/^INITIALIZED/, $type));
|
||||||
|
|
||||||
$aList = "disabled_by_attribute" unless AttrVal($name,'gdsUseAlerts',0);
|
$aList = "disabled_by_attribute" unless AttrVal($name,'gdsUseAlerts',0);
|
||||||
$fList = "disabled_by_attribute" unless AttrVal($name,'gdsUseForecasts',0);
|
$fList = "disabled_by_attribute" unless AttrVal($name,'gdsUseForecasts',0);
|
||||||
@@ -653,12 +655,6 @@ sub GDS_GetUpdate($;$) {
|
|||||||
$local //= 0;
|
$local //= 0;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
|
||||||
my $diff = int(time()) - $hash->{GDS_REREAD};
|
|
||||||
#Debug "GDS_GetUpdate started Diff: $diff";
|
|
||||||
return if( $diff < 60 );
|
|
||||||
#Debug "GDS_GetUpdate continued";
|
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
|
|
||||||
my $fs = AttrVal($name, "gdsSetForecast", 0);
|
my $fs = AttrVal($name, "gdsSetForecast", 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user