change execute condition for ShadingProcessingDriveCommand
This commit is contained in:
parent
9b3ca6618a
commit
1b90829744
@ -1,5 +1,5 @@
|
||||
UPD 2020-06-03_21:24:54 88722 FHEM/73_AutoShuttersControl.pm
|
||||
UPD 2020-06-03_21:58:45 186066 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-06-03_22:10:45 186158 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-06-03_16:33:32 2656 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||
UPD 2020-06-03_17:33:24 2478 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||
UPD 2020-06-03_17:46:59 28839 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||
|
@ -77,7 +77,7 @@ use FHEM::Automation::ShuttersControl::Shutters;
|
||||
use FHEM::Automation::ShuttersControl::Dev;
|
||||
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our @ISA = qw(Exporter);
|
||||
our @Export = qw($shutters $ascDev %userAttrList);
|
||||
|
||||
# try to use JSON::MaybeXS wrapper
|
||||
@ -192,19 +192,17 @@ BEGIN {
|
||||
computeAlignTime
|
||||
ReplaceEventMap)
|
||||
);
|
||||
|
||||
|
||||
#-- Export to main context with different name
|
||||
GP_Export(
|
||||
qw(
|
||||
ascAPIget
|
||||
ascAPIset
|
||||
DevStateIcon
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
## Die Attributsliste welche an die Rolläden verteilt wird. Zusammen mit Default Werten
|
||||
our %userAttrList = (
|
||||
'ASC_Mode_Up:absent,always,off,home' => '-',
|
||||
@ -435,8 +433,7 @@ sub Notify {
|
||||
readingsSingleUpdate( $hash, 'ascEnable', 'on', 0 )
|
||||
if ( $ascDev->getASCenable eq 'none' );
|
||||
CommandAttr( undef,
|
||||
$name
|
||||
. ' devStateIcon { ShuttersControl_DevStateIcon($name) }' )
|
||||
$name . ' devStateIcon { ShuttersControl_DevStateIcon($name) }' )
|
||||
unless (
|
||||
AttrVal(
|
||||
$name, 'devStateIcon',
|
||||
@ -465,11 +462,16 @@ sub Notify {
|
||||
unless ( scalar( @{ $hash->{helper}{shuttersList} } ) == 0 ) {
|
||||
WriteReadingsShuttersList($hash);
|
||||
UserAttributs_Readings_ForShutters( $hash, 'add' );
|
||||
InternalTimer( gettimeofday() + 3,
|
||||
'FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer',
|
||||
$hash );
|
||||
InternalTimer( gettimeofday() + 5,
|
||||
'FHEM::Automation::ShuttersControl::AutoSearchTwilightDev', $hash );
|
||||
InternalTimer(
|
||||
gettimeofday() + 3,
|
||||
'FHEM::Automation::ShuttersControl::RenewSunRiseSetShuttersTimer',
|
||||
$hash
|
||||
);
|
||||
InternalTimer(
|
||||
gettimeofday() + 5,
|
||||
'FHEM::Automation::ShuttersControl::AutoSearchTwilightDev',
|
||||
$hash
|
||||
);
|
||||
InternalTimer(
|
||||
gettimeofday() + 5,
|
||||
sub() { CommandSet( undef, $name . ' controlShading on' ) },
|
||||
@ -2578,7 +2580,6 @@ sub ShadingProcessing {
|
||||
&& !$shutters->getShadingManualDriveStatus
|
||||
&& $shutters->getRoommatesStatus ne 'gotosleep'
|
||||
&& $shutters->getRoommatesStatus ne 'asleep'
|
||||
&& $shutters->getStatus != $shutters->getClosedPos
|
||||
&& (
|
||||
(
|
||||
$shutters->getShadingStatus eq 'out'
|
||||
@ -2597,10 +2598,15 @@ sub ShadingProcessing {
|
||||
|| $shutters->getModeUp eq 'off'
|
||||
)
|
||||
&& (
|
||||
( int( gettimeofday() ) - $shutters->getShadingStatusTimestamp ) < 2
|
||||
(
|
||||
(
|
||||
int( gettimeofday() ) -
|
||||
$shutters->getShadingStatusTimestamp
|
||||
) < 2
|
||||
&& $shutters->getStatus != $shutters->getClosedPos
|
||||
)
|
||||
|| ( !$shutters->getQueryShuttersPos( $shutters->getShadingPos )
|
||||
&& $shutters->getIfInShading
|
||||
&& $shutters->getStatus != $shutters->getShadingPos )
|
||||
&& $shutters->getIfInShading )
|
||||
|| ( !$shutters->getIfInShading
|
||||
&& $shutters->getStatus == $shutters->getShadingPos )
|
||||
)
|
||||
@ -4914,9 +4920,11 @@ sub _CheckASC_ConditionsForShadingFn {
|
||||
|
||||
my $count = 1;
|
||||
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
||||
InternalTimer( gettimeofday() + $count,
|
||||
'FHEM::Automation::ShuttersControl::_CheckShuttersConditionsForShadingFn',
|
||||
$shuttersDev );
|
||||
InternalTimer(
|
||||
gettimeofday() + $count,
|
||||
'FHEM::Automation::ShuttersControl::_CheckShuttersConditionsForShadingFn',
|
||||
$shuttersDev
|
||||
);
|
||||
|
||||
$count++;
|
||||
}
|
||||
@ -4993,5 +5001,4 @@ sub _CheckShuttersConditionsForShadingFn {
|
||||
readingsEndUpdate( $shuttersDevHash, 1 );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user