RollCheck: temperatur draussen mit offset

This commit is contained in:
2017-07-16 22:18:28 +02:00
parent f0a2d4fa2f
commit 8617ead8e1

View File

@@ -83,6 +83,9 @@ my @blocktime=localtime;
my $blocktimerRunning=0; my $blocktimerRunning=0;
my $delaySec=11; my $delaySec=11;
my $tempIn_offset=0;
my $tempOut_offset=+1;
#------------------------------------------ #------------------------------------------
sub myfhem($) { sub myfhem($) {
@@ -317,10 +320,10 @@ sub checkTemps($$$)
my($temp, $tempOut, $tempSoll)=@_; my($temp, $tempOut, $tempSoll)=@_;
my $tempH=0; my $tempOH=0; my $tempL=0; my$tempOL=0; my $tempH=0; my $tempOH=0; my $tempL=0; my$tempOL=0;
if ($temp > $tempSoll-0) { $tempH =1; } if ($temp > $tempSoll+$tempIn_offset+0.5) { $tempH =1; }
if ($temp < $tempSoll-1) { $tempL =1; } if ($temp < $tempSoll+$tempIn_offset-0.5) { $tempL =1; }
if ($tempOut > $tempSoll-2) { $tempOH=1; } if ($tempOut > $tempSoll+$tempOut_offset+0.5) { $tempOH=1; }
if ($tempOut < $tempSoll-3) { $tempOL=1; } if ($tempOut < $tempSoll+$tempOut_offset-0.5) { $tempOL=1; }
return($tempH, $tempOH, $tempL, $tempOL); return($tempH, $tempOH, $tempL, $tempOL);
} }
@@ -366,7 +369,7 @@ sub checkSkip($$$)
sub RollCheck() { sub RollCheck() {
my $r; my $r;
my $ndelay =0; my $ndelay =1;
my $tempOut=ReadingsVal("myWH1080", "Temp-outside", 99); my $tempOut=ReadingsVal("myWH1080", "Temp-outside", 99);
my $twil =Value("twil"); my $twil =Value("twil");
my $light =ReadingsVal("twil", "light", 0); my $light =ReadingsVal("twil", "light", 0);