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

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

View File

@ -1,11 +1,11 @@
UPD 2020-07-07_14:49:19 97041 FHEM/73_AutoShuttersControl.pm
UPD 2020-07-07_14:50:20 178051 lib/FHEM/Automation/ShuttersControl.pm
UPD 2020-07-07_14:53:42 178051 lib/FHEM/Automation/ShuttersControl.pm
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2020-07-07_14:49:19 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2020-07-07_14:49:19 30710 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2020-07-07_14:49:19 17908 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2020-06-22_09:41:40 11454 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2020-07-08_10:02:07 11573 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2020-07-03_11:29:10 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
UPD 2020-07-03_11:29:10 52390 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm

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} = (
$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'