change code in loop for fix carsten-bug
This commit is contained in:
parent
ce32256130
commit
36f0f45fb4
@ -2712,80 +2712,91 @@ sub RenewSunRiseSetShuttersTimer($) {
|
|||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
|
|
||||||
foreach ( @{ $hash->{helper}{shuttersList} } ) {
|
foreach ( @{ $hash->{helper}{shuttersList} } ) {
|
||||||
$shutters->setShuttersDev($_);
|
my $name = $_;
|
||||||
|
my $dhash = $defs{$name};
|
||||||
|
|
||||||
|
$shutters->setShuttersDev($name);
|
||||||
|
|
||||||
RemoveInternalTimer( $shutters->getInTimerFuncHash );
|
RemoveInternalTimer( $shutters->getInTimerFuncHash );
|
||||||
$shutters->setInTimerFuncHash(undef);
|
$shutters->setInTimerFuncHash(undef);
|
||||||
CreateSunRiseSetShuttersTimer( $hash, $_ );
|
CreateSunRiseSetShuttersTimer( $hash, $name );
|
||||||
|
|
||||||
#### Temporär angelegt damit die neue Attributs Parameter Syntax verteilt werden kann
|
#### Temporär angelegt damit die neue Attributs Parameter Syntax verteilt werden kann
|
||||||
#### Gleichlautende Attribute wo lediglich die Parameter geändert werden sollen müssen bereits in der Funktion ShuttersDeviceScan gelöscht werden
|
#### Gleichlautende Attribute wo lediglich die Parameter geändert werden sollen müssen bereits in der Funktion ShuttersDeviceScan gelöscht werden
|
||||||
#### vorher empfiehlt es sich die dort vergebenen Parameter aus zu lesen um sie dann hier wieder neu zu setzen. Dazu wird das shutters Objekt um einen Eintrag
|
#### vorher empfiehlt es sich die dort vergebenen Parameter aus zu lesen um sie dann hier wieder neu zu setzen. Dazu wird das shutters Objekt um einen Eintrag
|
||||||
#### 'AttrUpdateChanges' erweitert
|
#### 'AttrUpdateChanges' erweitert
|
||||||
if ( ( int( gettimeofday() ) - $::fhem_started ) < 60
|
if (
|
||||||
|
( int( gettimeofday() ) - $::fhem_started ) < 60
|
||||||
and
|
and
|
||||||
ReadingsVal( $_, '.ASC_AttrUpdateChanges_' . $hash->{VERSION}, 0 )
|
ReadingsVal( $name, '.ASC_AttrUpdateChanges_' . $hash->{VERSION},
|
||||||
== 0 )
|
0 ) == 0
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$attr{$_}{'ASC_Up'} = $shutters->getAttrUpdateChanges('ASC_Up')
|
$attr{$name}{'ASC_Up'} = $shutters->getAttrUpdateChanges('ASC_Up')
|
||||||
if ( $shutters->getAttrUpdateChanges('ASC_Up') ne 'none' );
|
if ( $shutters->getAttrUpdateChanges('ASC_Up') ne 'none' );
|
||||||
$attr{$_}{'ASC_Down'} = $shutters->getAttrUpdateChanges('ASC_Down')
|
$attr{$name}{'ASC_Down'} =
|
||||||
|
$shutters->getAttrUpdateChanges('ASC_Down')
|
||||||
if ( $shutters->getAttrUpdateChanges('ASC_Down') ne 'none' );
|
if ( $shutters->getAttrUpdateChanges('ASC_Down') ne 'none' );
|
||||||
$attr{$_}{'ASC_Self_Defense_Mode'} =
|
$attr{$name}{'ASC_Self_Defense_Mode'} =
|
||||||
$shutters->getAttrUpdateChanges('ASC_Self_Defense_Mode')
|
$shutters->getAttrUpdateChanges('ASC_Self_Defense_Mode')
|
||||||
if ( $shutters->getAttrUpdateChanges('ASC_Self_Defense_Mode') ne
|
if ( $shutters->getAttrUpdateChanges('ASC_Self_Defense_Mode') ne
|
||||||
'none' );
|
'none' );
|
||||||
$attr{$_}{'ASC_Self_Defense_Mode'} = 'off'
|
$attr{$name}{'ASC_Self_Defense_Mode'} = 'off'
|
||||||
if (
|
if (
|
||||||
$shutters->getAttrUpdateChanges('ASC_Self_Defense_Exclude') eq
|
$shutters->getAttrUpdateChanges('ASC_Self_Defense_Exclude') eq
|
||||||
'on' );
|
'on' );
|
||||||
|
|
||||||
CommandDeleteReading( undef, $_ . ' .ASC_AttrUpdateChanges_.*' )
|
CommandDeleteReading( undef, $name . ' .ASC_AttrUpdateChanges_.*' )
|
||||||
if (
|
if (
|
||||||
ReadingsVal( $_, '.ASC_AttrUpdateChanges_' . $hash->{VERSION},
|
ReadingsVal(
|
||||||
'none' ) eq 'none'
|
$name, '.ASC_AttrUpdateChanges_' . $hash->{VERSION},
|
||||||
|
'none'
|
||||||
|
) eq 'none'
|
||||||
);
|
);
|
||||||
readingsSingleUpdate( $defs{$_},
|
readingsSingleUpdate( $dhash,
|
||||||
'.ASC_AttrUpdateChanges_' . $hash->{VERSION},
|
'.ASC_AttrUpdateChanges_' . $hash->{VERSION},
|
||||||
1, 0 );
|
1, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$attr{$_}{ASC_Drive_Delay} = AttrVal( $_, 'ASC_Drive_Offset', 'none' )
|
$attr{$name}{ASC_Drive_Delay} =
|
||||||
if ( AttrVal( $_, 'ASC_Drive_Offset', 'none' ) ne 'none' );
|
AttrVal( $name, 'ASC_Drive_Offset', 'none' )
|
||||||
delFromDevAttrList( $_, 'ASC_Drive_Offset' );
|
if ( AttrVal( $name, 'ASC_Drive_Offset', 'none' ) ne 'none' );
|
||||||
|
delFromDevAttrList( $name, 'ASC_Drive_Offset' );
|
||||||
|
|
||||||
$attr{$_}{ASC_Drive_DelayStart} =
|
$attr{$name}{ASC_Drive_DelayStart} =
|
||||||
AttrVal( $_, 'ASC_Drive_OffsetStart', 'none' )
|
AttrVal( $name, 'ASC_Drive_OffsetStart', 'none' )
|
||||||
if ( AttrVal( $_, 'ASC_Drive_OffsetStart', 'none' ) ne 'none' );
|
if ( AttrVal( $name, 'ASC_Drive_OffsetStart', 'none' ) ne 'none' );
|
||||||
delFromDevAttrList( $_, 'ASC_Drive_OffsetStart' );
|
delFromDevAttrList( $name, 'ASC_Drive_OffsetStart' );
|
||||||
|
|
||||||
$attr{$_}{ASC_Shading_StateChange_SunnyCloudy} =
|
$attr{$name}{ASC_Shading_StateChange_SunnyCloudy} =
|
||||||
AttrVal( $_, 'ASC_Shading_StateChange_Sunny', 'none' ) . ':'
|
AttrVal( $name, 'ASC_Shading_StateChange_Sunny', 'none' ) . ':'
|
||||||
. AttrVal( $_, 'ASC_Shading_StateChange_Cloudy', 'none' )
|
. AttrVal( $name, 'ASC_Shading_StateChange_Cloudy', 'none' )
|
||||||
if ( AttrVal( $_, 'ASC_Shading_StateChange_Sunny', 'none' ) ne 'none'
|
if (
|
||||||
and AttrVal( $_, 'ASC_Shading_StateChange_Cloudy', 'none' ) ne
|
AttrVal( $name, 'ASC_Shading_StateChange_Sunny', 'none' ) ne 'none'
|
||||||
|
and AttrVal( $name, 'ASC_Shading_StateChange_Cloudy', 'none' ) ne
|
||||||
'none' );
|
'none' );
|
||||||
delFromDevAttrList( $_, 'ASC_Shading_StateChange_Sunny' );
|
delFromDevAttrList( $name, 'ASC_Shading_StateChange_Sunny' );
|
||||||
delFromDevAttrList( $_, 'ASC_Shading_StateChange_Cloudy' );
|
delFromDevAttrList( $name, 'ASC_Shading_StateChange_Cloudy' );
|
||||||
|
|
||||||
$attr{$_}{ASC_Shading_InOutAzimuth} =
|
$attr{$name}{ASC_Shading_InOutAzimuth} =
|
||||||
( AttrVal( $_, 'ASC_Shading_Direction', 180 ) -
|
( AttrVal( $name, 'ASC_Shading_Direction', 180 ) -
|
||||||
AttrVal( $_, 'ASC_Shading_Angle_Left', 85 ) )
|
AttrVal( $name, 'ASC_Shading_Angle_Left', 85 ) )
|
||||||
. ':'
|
. ':'
|
||||||
. ( AttrVal( $_, 'ASC_Shading_Direction', 180 ) +
|
. ( AttrVal( $name, 'ASC_Shading_Direction', 180 ) +
|
||||||
AttrVal( $_, 'ASC_Shading_Angle_Right', 85 ) )
|
AttrVal( $name, 'ASC_Shading_Angle_Right', 85 ) )
|
||||||
if ( AttrVal( $_, 'ASC_Shading_Direction', 'none' ) ne 'none'
|
if ( AttrVal( $name, 'ASC_Shading_Direction', 'none' ) ne 'none'
|
||||||
or AttrVal( $_, 'ASC_Shading_Angle_Left', 'none' ) ne 'none'
|
or AttrVal( $name, 'ASC_Shading_Angle_Left', 'none' ) ne 'none'
|
||||||
or AttrVal( $_, 'ASC_Shading_Angle_Right', 'none' ) ne 'none' );
|
or AttrVal( $name, 'ASC_Shading_Angle_Right', 'none' ) ne 'none' );
|
||||||
delFromDevAttrList( $_, 'ASC_Shading_Direction' );
|
delFromDevAttrList( $name, 'ASC_Shading_Direction' );
|
||||||
delFromDevAttrList( $_, 'ASC_Shading_Angle_Left' );
|
delFromDevAttrList( $name, 'ASC_Shading_Angle_Left' );
|
||||||
delFromDevAttrList( $_, 'ASC_Shading_Angle_Right' );
|
delFromDevAttrList( $name, 'ASC_Shading_Angle_Right' );
|
||||||
|
|
||||||
$attr{$_}{ASC_PrivacyDownValue_beforeNightClose} =
|
$attr{$name}{ASC_PrivacyDownValue_beforeNightClose} =
|
||||||
AttrVal( $_, 'ASC_PrivacyDownTime_beforNightClose', 'none' )
|
AttrVal( $name, 'ASC_PrivacyDownTime_beforNightClose', 'none' )
|
||||||
if ( AttrVal( $_, 'ASC_PrivacyDownTime_beforNightClose', 'none' ) ne
|
if (
|
||||||
|
AttrVal( $name, 'ASC_PrivacyDownTime_beforNightClose', 'none' ) ne
|
||||||
'none' );
|
'none' );
|
||||||
delFromDevAttrList( $_, 'ASC_PrivacyDownTime_beforNightClose' );
|
delFromDevAttrList( $name, 'ASC_PrivacyDownTime_beforNightClose' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7419,7 +7430,7 @@ sub getblockAscDrivesAfterManual {
|
|||||||
],
|
],
|
||||||
"release_status": "under develop",
|
"release_status": "under develop",
|
||||||
"license": "GPL_2",
|
"license": "GPL_2",
|
||||||
"version": "v0.6.139",
|
"version": "v0.6.140",
|
||||||
"author": [
|
"author": [
|
||||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user