fix PERL WARNING: Argument "rain" isn't numeric in multiplication

geändert:       lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
This commit is contained in:
2020-07-08 10:02:29 +02:00
parent a37b6eddb9
commit 2bafc3d433
2 changed files with 9 additions and 5 deletions

View File

@ -267,9 +267,13 @@ sub _getRainSensor {
( $reading ne 'none' ? $reading : 'state' );
$self->{ASC_rainSensor}->{triggermax} = ( $max ne 'none' ? $max : 1000 );
$self->{ASC_rainSensor}->{triggerhyst} = (
$hyst ne 'none'
? $max - $hyst
: ( $self->{ASC_rainSensor}->{triggermax} * 0 )
$max ~= m{\A\[A-Za-z]+\z}xms
? $self->{ASC_rainSensor}->{triggermax}
: (
$hyst ne 'none'
? $max - $hyst
: ( $self->{ASC_rainSensor}->{triggermax} * 0 )
)
);
$self->{ASC_rainSensor}->{shuttersClosedPos} =
( $pos ne 'none'