mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fhem.pl: observe module-specific ignoredReadings (Forum #120603)
git-svn-id: https://svn.fhem.de/fhem/trunk@24721 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8d3d804a47
commit
fb18b38b0c
15
fhem/fhem.pl
15
fhem/fhem.pl
@ -2507,11 +2507,9 @@ CommandSetReading($$)
|
||||
|
||||
if($b1 eq "IODev") {
|
||||
my $ret = fhem_setIoDev($hash, $b[2]);
|
||||
if($ret) {
|
||||
push @rets, $ret;
|
||||
push @rets, $ret if($ret);
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
if($hash->{".updateTime"}) { # Called from userReadings, #110375
|
||||
Log 1, "'setreading $def' called form userReadings is prohibited";
|
||||
@ -3219,8 +3217,7 @@ CommandSetstate($$)
|
||||
if(!defined($d->{READINGS}{$sname}) ||
|
||||
!defined($d->{READINGS}{$sname}{TIME}) ||
|
||||
$d->{READINGS}{$sname}{TIME} lt $tim) {
|
||||
$d->{READINGS}{$sname}{VAL} = $sval;
|
||||
$d->{READINGS}{$sname}{TIME} = $tim;
|
||||
setReadingsVal($d, $sname, $sval, $tim);
|
||||
}
|
||||
|
||||
|
||||
@ -4702,6 +4699,14 @@ setReadingsVal($$$$)
|
||||
{
|
||||
my ($hash,$rname,$val,$ts) = @_;
|
||||
|
||||
my $t = $hash->{TYPE};
|
||||
if($t) {
|
||||
my $m = $modules{$t}; # Forum 120603
|
||||
if($m && $m->{ignoredReadings} && $m->{ignoredReadings}{$rname}) {
|
||||
Log 4, "setReadingsVal: IGNORING $hash->{NAME} reading";
|
||||
return;
|
||||
}
|
||||
}
|
||||
if($hash->{".or"} && grep($rname =~ m/^$_$/, @{$hash->{".or"}}) ) {
|
||||
if(defined($hash->{READINGS}{$rname}) &&
|
||||
defined($hash->{READINGS}{$rname}{VAL}) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user