change homemmode condition for shading in shadingDrive Fn

This commit is contained in:
Marko Oldenburg 2019-06-21 09:19:49 +02:00
parent 4011a56656
commit ed631686d9

View File

@ -1739,19 +1739,10 @@ sub EventProcessingShadingBrightness($@) {
. ' WindProtection: ' . ' WindProtection: '
. $shutters->getWindProtectionStatus ); . $shutters->getWindProtectionStatus );
my $homemode = $shutters->getRoommatesStatus; if ( IsDay($shuttersDev)
$homemode = $ascDev->getResidentsStatus if ( $homemode eq 'none' );
if (
(
$shutters->getShadingMode eq 'always'
or $shutters->getShadingMode eq $homemode
)
and IsDay($shuttersDev)
and $ascDev->getAutoShuttersControlShading eq 'on' and $ascDev->getAutoShuttersControlShading eq 'on'
and $shutters->getRainProtectionStatus eq 'unprotected' and $shutters->getRainProtectionStatus eq 'unprotected'
and $shutters->getWindProtectionStatus eq 'unprotected' and $shutters->getWindProtectionStatus eq 'unprotected' )
)
{ {
ShadingProcessing( ShadingProcessing(
$hash, $hash,
@ -1771,7 +1762,6 @@ sub EventProcessingShadingBrightness($@) {
); );
} }
elsif ( $shutters->getShadingStatus eq 'in' elsif ( $shutters->getShadingStatus eq 'in'
and $shutters->getShadingMode ne $homemode
and $shutters->getRainProtectionStatus eq 'unprotected' and $shutters->getRainProtectionStatus eq 'unprotected'
and $shutters->getWindProtectionStatus eq 'unprotected' ) and $shutters->getWindProtectionStatus eq 'unprotected' )
{ {
@ -2070,6 +2060,12 @@ sub ShadingProcessingDriveCommand($$) {
my $getShadingPos = $shutters->getShadingPos; my $getShadingPos = $shutters->getShadingPos;
my $getStatus = $shutters->getStatus; my $getStatus = $shutters->getStatus;
my $homemode = $shutters->getRoommatesStatus;
$homemode = $ascDev->getResidentsStatus if ( $homemode eq 'none' );
if ( $shutters->getShadingMode eq 'always'
or $shutters->getShadingMode eq $homemode )
{
$shutters->setShadingStatus( $shutters->getShadingStatus ) $shutters->setShadingStatus( $shutters->getShadingStatus )
if ( if (
( int( gettimeofday() ) - $shutters->getShadingStatusTimestamp ) > ( int( gettimeofday() ) - $shutters->getShadingStatusTimestamp ) >
@ -2134,6 +2130,7 @@ sub ShadingProcessingDriveCommand($$) {
) )
); );
} }
}
sub EventProcessingPartyMode($) { sub EventProcessingPartyMode($) {
my ($hash) = @_; my ($hash) = @_;
@ -6173,7 +6170,7 @@ sub getblockAscDrivesAfterManual {
"release_status": "under develop", "release_status": "under develop",
"license": "GPL_2", "license": "GPL_2",
"version": "v0.6.19", "version": "v0.6.19",
"x_developmentversion": "v0.6.19.5", "x_developmentversion": "v0.6.19.6",
"author": [ "author": [
"Marko Oldenburg <leongaultier@gmail.com>" "Marko Oldenburg <leongaultier@gmail.com>"
], ],