2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 01:46:08 +00:00

38_netatmo.pm: don't overwrite interval on modify

git-svn-id: https://svn.fhem.de/fhem/trunk@7558 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2015-01-13 20:03:11 +00:00
parent 62768c34df
commit 3a79d894d9

View File

@ -58,7 +58,7 @@ netatmo_Define($$)
$hash->{Device} = $device; $hash->{Device} = $device;
$hash->{INTERVAL} = 60*5; $hash->{INTERVAL} = 60*5 if( !$hash->{INTERVAL} );
my $d = $modules{$hash->{TYPE}}{defptr}{"D$device"}; my $d = $modules{$hash->{TYPE}}{defptr}{"D$device"};
return "device $device already defined as $d->{NAME}" if( defined($d) && $d->{NAME} ne $name ); return "device $device already defined as $d->{NAME}" if( defined($d) && $d->{NAME} ne $name );
@ -123,7 +123,7 @@ netatmo_Define($$)
$modules{$hash->{TYPE}}{defptr}{"D$device"} = $hash; $modules{$hash->{TYPE}}{defptr}{"D$device"} = $hash;
} }
$hash->{INTERVAL} = 60*15; $hash->{INTERVAL} = 60*15 if( !$hash->{INTERVAL} );
} elsif( ($a[2] eq "MODULE" && @a == 5 ) ) { } elsif( ($a[2] eq "MODULE" && @a == 5 ) ) {
$subtype = "MODULE"; $subtype = "MODULE";
@ -134,7 +134,7 @@ netatmo_Define($$)
$hash->{Device} = $device; $hash->{Device} = $device;
$hash->{Module} = $module; $hash->{Module} = $module;
$hash->{INTERVAL} = 60*5; $hash->{INTERVAL} = 60*5 if( !$hash->{INTERVAL} );
my $d = $modules{$hash->{TYPE}}{defptr}{"M$module"}; my $d = $modules{$hash->{TYPE}}{defptr}{"M$module"};
return "module $module already defined as $d->{NAME}" if( defined($d) && $d->{NAME} ne $name ); return "module $module already defined as $d->{NAME}" if( defined($d) && $d->{NAME} ne $name );
@ -1027,7 +1027,7 @@ netatmo_Attr($$$)
if( $attrName eq "interval" ) { if( $attrName eq "interval" ) {
my $hash = $defs{$name}; my $hash = $defs{$name};
$hash->{INTERVAL} = $attrVal; $hash->{INTERVAL} = $attrVal;
$hash->{INTERVAL} = 60*5 if( !$attrVal ); $hash->{INTERVAL} = 60*5 if( !$hash->{INTERVAL} );
} elsif( $attrName eq "disable" ) { } elsif( $attrName eq "disable" ) {
my $hash = $defs{$name}; my $hash = $defs{$name};
RemoveInternalTimer($hash); RemoveInternalTimer($hash);