change version and code style
This commit is contained in:
parent
372e11598c
commit
7feef51543
@ -229,7 +229,9 @@ sub Define($$) {
|
||||
; # es wird geprüft ob bereits eine Instanz unseres Modules existiert,wenn ja wird abgebrochen
|
||||
return 'too few parameters: define <name> ShuttersControl' if ( @a != 2 );
|
||||
return
|
||||
'Cannot define ShuttersControl device. Perl modul ' . ${missingModul} . 'is missing.'
|
||||
'Cannot define ShuttersControl device. Perl modul '
|
||||
. ${missingModul}
|
||||
. 'is missing.'
|
||||
if ($missingModul)
|
||||
; # Abbruch wenn benötigte Hilfsmodule nicht vorhanden sind / vorerst unwichtig
|
||||
|
||||
@ -789,8 +791,10 @@ sub EventProcessingWindowRec($@) {
|
||||
$shutters->setShuttersDev($shuttersDev);
|
||||
|
||||
#### Hardware Lock der Rollläden
|
||||
$shutters->setHardLockOut('off') if ( $1 eq 'closed' and $shutters->getShuttersPlace eq 'terrace' );
|
||||
$shutters->setHardLockOut('on') if ( $1 eq 'open' and $shutters->getShuttersPlace eq 'terrace' );
|
||||
$shutters->setHardLockOut('off')
|
||||
if ( $1 eq 'closed' and $shutters->getShuttersPlace eq 'terrace' );
|
||||
$shutters->setHardLockOut('on')
|
||||
if ( $1 eq 'open' and $shutters->getShuttersPlace eq 'terrace' );
|
||||
|
||||
$shutters->setNoOffset(1);
|
||||
|
||||
@ -825,18 +829,21 @@ sub EventProcessingWindowRec($@) {
|
||||
and $shutters->getStatus != $shutters->getOpenPos
|
||||
and ( $homemode ne 'asleep'
|
||||
or $homemode ne 'gotosleep'
|
||||
or $homemode eq 'none' ) )
|
||||
or $homemode eq 'none' )
|
||||
)
|
||||
{
|
||||
$shutters->setLastDrive('window day closed');
|
||||
ShuttersCommandSet( $hash, $shuttersDev,$shutters->getLastPos );
|
||||
ShuttersCommandSet( $hash, $shuttersDev,
|
||||
$shutters->getLastPos );
|
||||
}
|
||||
|
||||
elsif ( not IsDay( $hash, $shuttersDev )
|
||||
elsif (not IsDay( $hash, $shuttersDev )
|
||||
or $homemode eq 'asleep'
|
||||
or $homemode eq 'gotosleep' )
|
||||
{
|
||||
$shutters->setLastDrive('window night closed');
|
||||
ShuttersCommandSet( $hash, $shuttersDev,$shutters->getClosedPos );
|
||||
ShuttersCommandSet( $hash, $shuttersDev,
|
||||
$shutters->getClosedPos );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1066,7 +1073,9 @@ sub EventProcessingResidents($@) {
|
||||
{
|
||||
$shutters->setLastDrive('selfeDefense inactive');
|
||||
$shutters->setDriveCmd( $shutters->getLastPos );
|
||||
$shutters->setHardLockOut('on') if ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 and $shutters->getShuttersPlace eq 'terrace' );
|
||||
$shutters->setHardLockOut('on')
|
||||
if ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
||||
and $shutters->getShuttersPlace eq 'terrace' );
|
||||
}
|
||||
elsif (
|
||||
$shutters->getStatus == $shutters->getClosedPos
|
||||
@ -1313,7 +1322,6 @@ sub ShadingProcessing($@) {
|
||||
) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
|
||||
# Log3( $name, 1,
|
||||
# "AutoShuttersControl ($name) - Shading Processing, Rollladen: " . $shuttersDev . " Azimuth: " . $azimuth . " Elevation: " . $elevation . " Brightness: " . $brightness . " OutTemp: " . $outTemp
|
||||
# );
|
||||
@ -1331,7 +1339,6 @@ sub ShadingProcessing($@) {
|
||||
# Log3( $name, 1,
|
||||
# "AutoShuttersControl ($name) - Shading Processing hinter dem return");
|
||||
|
||||
|
||||
}
|
||||
|
||||
sub EventProcessingPartyMode($) {
|
||||
@ -2328,10 +2335,12 @@ sub setHardLockOut {
|
||||
CommandSet( undef, $self->{shuttersDev} . ' inhibit ' . $cmd )
|
||||
if ( $shutters->getLockOutCmd eq 'inhibit' );
|
||||
CommandSet( undef,
|
||||
$self->{shuttersDev} . ' ' . ( $cmd eq 'on' ? 'blocked' : 'unblocked' ) )
|
||||
$self->{shuttersDev} . ' '
|
||||
. ( $cmd eq 'on' ? 'blocked' : 'unblocked' ) )
|
||||
if ( $shutters->getLockOutCmd eq 'blocked' );
|
||||
CommandSet( undef,
|
||||
$self->{shuttersDev} . ' ' . ( $cmd eq 'on' ? 'protectionOn' : 'protectionOff' ) )
|
||||
$self->{shuttersDev} . ' '
|
||||
. ( $cmd eq 'on' ? 'protectionOn' : 'protectionOff' ) )
|
||||
if ( $shutters->getLockOutCmd eq 'protection' );
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user