mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 19:36:02 +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:
parent
7d4e2a80a7
commit
a132bffdb8
@ -67,8 +67,6 @@ eval "use Storable qw(freeze thaw);1;" or my $storabs = 'Storable';
|
|||||||
use FHEM::SynoModules::SMUtils qw(moduleVersion); # Hilfsroutinen Modul
|
use FHEM::SynoModules::SMUtils qw(moduleVersion); # Hilfsroutinen Modul
|
||||||
#use Data::Dumper;
|
#use Data::Dumper;
|
||||||
|
|
||||||
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|
||||||
|
|
||||||
# Run before module compilation
|
# Run before module compilation
|
||||||
BEGIN {
|
BEGIN {
|
||||||
# Import from main::
|
# Import from main::
|
||||||
@ -122,6 +120,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern (Versions history by Heiko Maaz)
|
# Versions History intern (Versions history by Heiko Maaz)
|
||||||
my %vNotesIntern = (
|
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 ".
|
"0.2.5" => "02.04.2024 _callAnalogValue / _callAlarmInfo: integrate a Cell and Temperature Position counter ".
|
||||||
"add specific Alarm readings ",
|
"add specific Alarm readings ",
|
||||||
"0.2.4" => "29.03.2024 avoid possible Illegal division by zero at line 1438 ",
|
"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}) {
|
for my $rdg (keys %{$readings}) {
|
||||||
next if(!defined $readings->{$rdg});
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@ -1560,7 +1559,7 @@ sub deleteReadingspec {
|
|||||||
my $readingspec = '^'.$spec.'$';
|
my $readingspec = '^'.$spec.'$';
|
||||||
|
|
||||||
for my $reading ( grep { /$readingspec/x } keys %{$hash->{READINGS}} ) {
|
for my $reading ( grep { /$readingspec/x } keys %{$hash->{READINGS}} ) {
|
||||||
next if($reading ~~ @blackl);
|
next if(grep /^$reading$/, @blackl);
|
||||||
readingsDelete ($hash, $reading);
|
readingsDelete ($hash, $reading);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user