change outTemp condition for shading out

This commit is contained in:
Marko Oldenburg 2020-05-21 09:38:20 +02:00
parent e87578a082
commit 2e7deafc55

View File

@ -2222,16 +2222,16 @@ sub EventProcessingTwilightDevice {
); );
if ( $events =~ m{(azimuth|elevation|SunAz|SunAlt):\s(\d+.\d+)}xms ) { if ( $events =~ m{(azimuth|elevation|SunAz|SunAlt):\s(\d+.\d+)}xms ) {
my $name = $device; my $name = $device;
my ( $azimuth, $elevation ); my ( $azimuth, $elevation );
my $outTemp = $ascDev->getOutTemp; my $outTemp = $ascDev->getOutTemp;
$azimuth = $2 if ( $1 eq 'azimuth' || $1 eq 'SunAz' ); $azimuth = $2 if ( $1 eq 'azimuth' || $1 eq 'SunAz' );
$elevation = $2 if ( $1 eq 'elevation' || $1 eq 'SunAlt' ); $elevation = $2 if ( $1 eq 'elevation' || $1 eq 'SunAlt' );
$azimuth = $ascDev->getAzimuth $azimuth = $ascDev->getAzimuth
if ( !defined($azimuth) && !$azimuth ); if ( !defined($azimuth) && !$azimuth );
$elevation = $ascDev->getElevation $elevation = $ascDev->getElevation
if ( !defined($elevation) && !$elevation ); if ( !defined($elevation) && !$elevation );
ASC_Debug( 'EventProcessingTwilightDevice: ' ASC_Debug( 'EventProcessingTwilightDevice: '
@ -2354,7 +2354,7 @@ sub ShadingProcessing {
if ( if (
( (
$outTemp < $shutters->getShadingMinOutsideTemperature - 3 $outTemp < $shutters->getShadingMinOutsideTemperature - 4
|| $azimuth < $azimuthLeft || $azimuth < $azimuthLeft
|| $azimuth > $azimuthRight || $azimuth > $azimuthRight
|| !$shutters->getIsDay || !$shutters->getIsDay
@ -2379,7 +2379,7 @@ sub ShadingProcessing {
|| $elevation < $shutters->getShadingMinElevation || $elevation < $shutters->getShadingMinElevation
|| $elevation > $shutters->getShadingMaxElevation || $elevation > $shutters->getShadingMaxElevation
|| $brightness < $shutters->getShadingStateChangeCloudy || $brightness < $shutters->getShadingStateChangeCloudy
|| $outTemp < $shutters->getShadingMinOutsideTemperature ) || $outTemp < $shutters->getShadingMinOutsideTemperature - 1 )
{ {
$shutters->setShadingStatus('out reserved') $shutters->setShadingStatus('out reserved')
if ( $shutters->getShadingStatus eq 'in' if ( $shutters->getShadingStatus eq 'in'