2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 07:16:03 +00:00

70_PylonLowVoltage: replace Smartmatch Forum:#137776

git-svn-id: https://svn.fhem.de/fhem/trunk@28908 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2024-05-25 14:01:45 +00:00
parent 7d4e2a80a7
commit a132bffdb8

View File

@ -67,8 +67,6 @@ eval "use Storable qw(freeze thaw);1;" or my $storabs = 'Storable';
use FHEM::SynoModules::SMUtils qw(moduleVersion); # Hilfsroutinen Modul
#use Data::Dumper;
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
# Run before module compilation
BEGIN {
# Import from main::
@ -122,6 +120,7 @@ BEGIN {
# Versions History intern (Versions history by Heiko Maaz)
my %vNotesIntern = (
"0.2.6" => "25.05.2024 replace Smartmatch Forum:#137776 ",
"0.2.5" => "02.04.2024 _callAnalogValue / _callAlarmInfo: integrate a Cell and Temperature Position counter ".
"add specific Alarm readings ",
"0.2.4" => "29.03.2024 avoid possible Illegal division by zero at line 1438 ",
@ -1540,10 +1539,10 @@ sub createReadings {
for my $rdg (keys %{$readings}) {
next if(!defined $readings->{$rdg});
readingsBulkUpdate ($hash, $rdg, $readings->{$rdg}) if($success || $rdg ~~ @blackl);
readingsBulkUpdate ($hash, $rdg, $readings->{$rdg}) if($success || grep /^$rdg$/, @blackl);
}
readingsEndUpdate ($hash, 1);
readingsEndUpdate ($hash, 1);
return;
}
@ -1560,7 +1559,7 @@ sub deleteReadingspec {
my $readingspec = '^'.$spec.'$';
for my $reading ( grep { /$readingspec/x } keys %{$hash->{READINGS}} ) {
next if($reading ~~ @blackl);
next if(grep /^$reading$/, @blackl);
readingsDelete ($hash, $reading);
}