fix FHEM::Automation::ShuttersControl::Helper::GetAttrValues

This commit is contained in:
Marko Oldenburg 2022-01-01 09:22:19 +01:00
parent 4ea1db3aa0
commit 397f949a21
4 changed files with 23 additions and 23 deletions

View File

@ -5,11 +5,11 @@ UPD 2022-01-01_08:47:26 2405 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2022-01-01_08:47:58 32020 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2022-01-01_08:47:58 32020 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2022-01-01_08:42:08 25426 lib/FHEM/Automation/ShuttersControl/Shading.pm UPD 2022-01-01_08:42:08 25426 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2022-01-01_08:33:11 112138 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2022-01-01_08:33:11 112138 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2022-01-01_09:08:18 40302 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2022-01-01_09:14:06 40296 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2022-01-01_08:49:33 2211 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2022-01-01_08:49:33 2211 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2022-01-01_08:29:01 11716 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm UPD 2022-01-01_09:21:58 11706 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2022-01-01_08:28:05 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm UPD 2022-01-01_08:28:05 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2022-01-01_08:26:38 52775 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm UPD 2022-01-01_09:21:37 52751 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2022-01-01_08:24:22 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm UPD 2022-01-01_08:24:22 2799 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
UPD 2022-01-01_08:23:02 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm UPD 2022-01-01_08:23:02 3887 lib/FHEM/Automation/ShuttersControl/Window/Attr.pm
UPD 2022-01-01_08:20:59 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm UPD 2022-01-01_08:20:59 2200 lib/FHEM/Automation/ShuttersControl/Window/Readings.pm

View File

@ -76,7 +76,7 @@ sub getBrightnessMaxVal {
$self->{ASC_brightness}->{LASTGETTIME} = int( ::gettimeofday() ); $self->{ASC_brightness}->{LASTGETTIME} = int( ::gettimeofday() );
my ( $triggermax, $triggermin ) = my ( $triggermax, $triggermin ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( $name, FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
'ASC_brightnessDriveUpDown', '800:500' ); 'ASC_brightnessDriveUpDown', '800:500' );
## erwartetes Ergebnis ## erwartetes Ergebnis
@ -178,7 +178,7 @@ sub _getTempSensor {
&& ( ::gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 ); && ( ::gettimeofday() - $self->{ASC_tempSensor}->{LASTGETTIME} ) < 2 );
$self->{ASC_tempSensor}->{LASTGETTIME} = int( ::gettimeofday() ); $self->{ASC_tempSensor}->{LASTGETTIME} = int( ::gettimeofday() );
my ( $device, $reading ) = my ( $device, $reading ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( $name, FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
'ASC_tempSensor', 'none' ); 'ASC_tempSensor', 'none' );
## erwartetes Ergebnis ## erwartetes Ergebnis
@ -213,7 +213,7 @@ sub _getResidentsDev {
2 ); 2 );
$self->{ASC_residentsDev}->{LASTGETTIME} = int( ::gettimeofday() ); $self->{ASC_residentsDev}->{LASTGETTIME} = int( ::gettimeofday() );
my ( $device, $reading ) = my ( $device, $reading ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( $name, FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
'ASC_residentsDev', 'none' ); 'ASC_residentsDev', 'none' );
$self->{ASC_residentsDev}->{device} = $device; $self->{ASC_residentsDev}->{device} = $device;
@ -246,7 +246,7 @@ sub _getRainSensor {
&& ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 ); && ( ::gettimeofday() - $self->{ASC_rainSensor}->{LASTGETTIME} ) < 2 );
$self->{ASC_rainSensor}->{LASTGETTIME} = int( ::gettimeofday() ); $self->{ASC_rainSensor}->{LASTGETTIME} = int( ::gettimeofday() );
my ( $device, $reading, $max, $hyst, $pos, $wait ) = my ( $device, $reading, $max, $hyst, $pos, $wait ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( $name, FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
'ASC_rainSensor', 'none' ); 'ASC_rainSensor', 'none' );
## erwartetes Ergebnis ## erwartetes Ergebnis
@ -349,7 +349,7 @@ sub _getWindSensor {
&& ( ::gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 ); && ( ::gettimeofday() - $self->{ASC_windSensor}->{LASTGETTIME} ) < 2 );
$self->{ASC_windSensor}->{LASTGETTIME} = int( ::gettimeofday() ); $self->{ASC_windSensor}->{LASTGETTIME} = int( ::gettimeofday() );
my ( $device, $reading ) = my ( $device, $reading ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( $name, FHEM::Automation::ShuttersControl::Helper::GetAttrValues( $name,
'ASC_windSensor', 'none' ); 'ASC_windSensor', 'none' );
return $device if ( $device eq 'none' ); return $device if ( $device eq 'none' );

View File

@ -50,7 +50,7 @@ our @ISA = qw(Exporter);
our @EXPORT_OK = qw( our @EXPORT_OK = qw(
PositionValueWindowRec PositionValueWindowRec
AutoSearchTwilightDev AutoSearchTwilightDev
Get::AttrValues GetAttrValues
CheckIfShuttersWindowRecOpen CheckIfShuttersWindowRecOpen
ExtractNotifyDevFromEvent ExtractNotifyDevFromEvent
ShuttersSunrise ShuttersSunrise
@ -69,7 +69,7 @@ our %EXPORT_TAGS = (
qw( qw(
PositionValueWindowRec PositionValueWindowRec
AutoSearchTwilightDev AutoSearchTwilightDev
Get::AttrValues GetAttrValues
CheckIfShuttersWindowRecOpen CheckIfShuttersWindowRecOpen
ExtractNotifyDevFromEvent ExtractNotifyDevFromEvent
ShuttersSunrise ShuttersSunrise
@ -153,7 +153,7 @@ sub AutoSearchTwilightDev {
return; return;
} }
sub Get::AttrValues { sub GetAttrValues {
my $dev = shift; my $dev = shift;
my $attribut = shift; my $attribut = shift;
my $default = shift; my $default = shift;

View File

@ -108,7 +108,7 @@ sub _getPosition {
} }
else { else {
( $position, $posAssignment ) = ( $position, $posAssignment ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, $self->{shuttersDev},
$attr, $attr,
$FHEM::Automation::ShuttersControl::userAttrList{$userAttrList} $FHEM::Automation::ShuttersControl::userAttrList{$userAttrList}
@ -230,7 +230,7 @@ sub getSlatPosCmd {
$self->{ $self->{shuttersDev} }->{ASC_SlatPosCmd_SlatDevice}->{LASTGETTIME} $self->{ $self->{shuttersDev} }->{ASC_SlatPosCmd_SlatDevice}->{LASTGETTIME}
= int( ::gettimeofday() ); = int( ::gettimeofday() );
my ( $slatPosCmd, $slatDevice ) = my ( $slatPosCmd, $slatDevice ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_SlatPosCmd_SlatDevice', 'none:none' ); $self->{shuttersDev}, 'ASC_SlatPosCmd_SlatDevice', 'none:none' );
## Erwartetes Ergebnis ## Erwartetes Ergebnis
@ -293,7 +293,7 @@ sub getPrivacyUpTime {
$self->{ $self->{shuttersDev} }->{ASC_PrivacyUpValue_beforeDayOpen} $self->{ $self->{shuttersDev} }->{ASC_PrivacyUpValue_beforeDayOpen}
->{LASTGETTIME} = int( ::gettimeofday() ); ->{LASTGETTIME} = int( ::gettimeofday() );
my ( $upTime, $upBrightnessVal ) = my ( $upTime, $upBrightnessVal ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_PrivacyUpValue_beforeDayOpen', '-1:-1' ); $self->{shuttersDev}, 'ASC_PrivacyUpValue_beforeDayOpen', '-1:-1' );
## Erwartetes Ergebnis ## Erwartetes Ergebnis
@ -372,7 +372,7 @@ sub getPrivacyDownTime {
$self->{ $self->{shuttersDev} }->{ASC_PrivacyDownValue_beforeNightClose} $self->{ $self->{shuttersDev} }->{ASC_PrivacyDownValue_beforeNightClose}
->{LASTGETTIME} = int( ::gettimeofday() ); ->{LASTGETTIME} = int( ::gettimeofday() );
my ( $downTime, $downBrightnessVal ) = my ( $downTime, $downBrightnessVal ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, $self->{shuttersDev},
'ASC_PrivacyDownValue_beforeNightClose', '-1:-1' ); 'ASC_PrivacyDownValue_beforeNightClose', '-1:-1' );
@ -600,7 +600,7 @@ sub _getTempSensor {
$self->{ $self->{shuttersDev} }->{ASC_TempSensor}->{LASTGETTIME} = $self->{ $self->{shuttersDev} }->{ASC_TempSensor}->{LASTGETTIME} =
int( ::gettimeofday() ); int( ::gettimeofday() );
my ( $device, $reading ) = my ( $device, $reading ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_TempSensor', 'none' ); $self->{shuttersDev}, 'ASC_TempSensor', 'none' );
### erwartetes Ergebnis ### erwartetes Ergebnis
@ -660,7 +660,7 @@ sub _getIdleDetectionReading {
$self->{ $self->{shuttersDev} }->{ASC_Shutter_IdleDetection}->{LASTGETTIME} $self->{ $self->{shuttersDev} }->{ASC_Shutter_IdleDetection}->{LASTGETTIME}
= int( ::gettimeofday() ); = int( ::gettimeofday() );
my ( $reading, $value ) = my ( $reading, $value ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_Shutter_IdleDetection', 'none' ); $self->{shuttersDev}, 'ASC_Shutter_IdleDetection', 'none' );
### erwartetes Ergebnis ### erwartetes Ergebnis
@ -724,7 +724,7 @@ sub _getBrightnessSensor {
$self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{LASTGETTIME} = $self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{LASTGETTIME} =
int( ::gettimeofday() ); int( ::gettimeofday() );
my ( $device, $reading, $max, $min ) = my ( $device, $reading, $max, $min ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_BrightnessSensor', 'none' ); $self->{shuttersDev}, 'ASC_BrightnessSensor', 'none' );
### erwartetes Ergebnis ### erwartetes Ergebnis
@ -810,7 +810,7 @@ sub getShadingAzimuthRight {
$self->{ $self->{shuttersDev} }->{ASC_Shading_InOutAzimuth}->{LASTGETTIME} $self->{ $self->{shuttersDev} }->{ASC_Shading_InOutAzimuth}->{LASTGETTIME}
= int( ::gettimeofday() ); = int( ::gettimeofday() );
my ( $left, $right ) = my ( $left, $right ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_Shading_InOutAzimuth', '95:265' ); $self->{shuttersDev}, 'ASC_Shading_InOutAzimuth', '95:265' );
### erwartetes Ergebnis ### erwartetes Ergebnis
@ -869,7 +869,7 @@ sub getShadingMinElevation {
$self->{ $self->{shuttersDev} }->{ASC_Shading_MinMax_Elevation} $self->{ $self->{shuttersDev} }->{ASC_Shading_MinMax_Elevation}
->{LASTGETTIME} = int( ::gettimeofday() ); ->{LASTGETTIME} = int( ::gettimeofday() );
my ( $min, $max ) = my ( $min, $max ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_Shading_MinMax_Elevation', '25.0:100.0' ); $self->{shuttersDev}, 'ASC_Shading_MinMax_Elevation', '25.0:100.0' );
### erwartetes Ergebnis ### erwartetes Ergebnis
@ -939,7 +939,7 @@ sub getShadingStateChangeSunny {
$self->{ $self->{shuttersDev} }->{ASC_Shading_StateChange_SunnyCloudy} $self->{ $self->{shuttersDev} }->{ASC_Shading_StateChange_SunnyCloudy}
->{LASTGETTIME} = int( ::gettimeofday() ); ->{LASTGETTIME} = int( ::gettimeofday() );
my ( $sunny, $cloudy, $maxBrightnessAverageArrayObjects ) = my ( $sunny, $cloudy, $maxBrightnessAverageArrayObjects ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_Shading_StateChange_SunnyCloudy', $self->{shuttersDev}, 'ASC_Shading_StateChange_SunnyCloudy',
'35000:20000' ); '35000:20000' );
@ -1043,7 +1043,7 @@ sub getExternalTriggerDevice {
int( ::gettimeofday() ); int( ::gettimeofday() );
my ( $device, $reading, $valueActive, $valueInactive, $posActive, my ( $device, $reading, $valueActive, $valueInactive, $posActive,
$posInactive, $valueActive2, $posActive2 ) $posInactive, $valueActive2, $posActive2 )
= FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( = FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_ExternalTrigger', 'none' ); $self->{shuttersDev}, 'ASC_ExternalTrigger', 'none' );
### erwartetes Ergebnis ### erwartetes Ergebnis
@ -1541,7 +1541,7 @@ sub getWindMax {
$self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{LASTGETTIME} = $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{LASTGETTIME} =
int( ::gettimeofday() ); int( ::gettimeofday() );
my ( $max, $hyst, $pos ) = my ( $max, $hyst, $pos ) =
FHEM::Automation::ShuttersControl::Helper::Get::AttrValues( FHEM::Automation::ShuttersControl::Helper::GetAttrValues(
$self->{shuttersDev}, 'ASC_WindParameters', '50:20' ); $self->{shuttersDev}, 'ASC_WindParameters', '50:20' );
## Erwartetes Ergebnis ## Erwartetes Ergebnis