2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

57_CALVIEW.pm: fixed a bug

git-svn-id: https://svn.fhem.de/fhem/trunk@10923 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
chris1284 2016-02-23 17:20:36 +00:00
parent 6576d697e9
commit 9ef40cf3b7

View File

@ -45,10 +45,12 @@ sub CALVIEW_Define($$){
$hash->{STATE} = "Initialized";
$hash->{INTERVAL} = $inter;
$modes = "next" if (!defined($modes));
if($modes == 1) {$attr{$name}{modes} = "next";}
elsif($modes == 0){$attr{$name}{modes} = "next";}
elsif($modes == 2){$attr{$name}{modes} = "next";}
elsif($modes == 3){$attr{$name}{modes} = "next";}
if ( $modes =~ /^\d+$/) {
if($modes == 1) {$attr{$name}{modes} = "next";}
elsif($modes == 0){$attr{$name}{modes} = "next";}
elsif($modes == 2){$attr{$name}{modes} = "next";}
elsif($modes == 3){$attr{$name}{modes} = "next";}
}
elsif($modes eq "next"){$attr{$name}{modes} = "next";}
else {return "invalid mode \"$modes\", use 0,1,2 or next!"}
InternalTimer(gettimeofday()+2, "CALVIEW_GetUpdate", $hash, 0);