mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
suppress updating readings with undefined value
git-svn-id: https://svn.fhem.de/fhem/trunk@2420 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ea3721500a
commit
53e6569fff
@ -167,6 +167,7 @@ OWDevice_ReadValue($$) {
|
||||
|
||||
my $address= $hash->{fhem}{address};
|
||||
my $value= OWDevice_ReadFromServer($hash, "/$address/$reading");
|
||||
#Debug "/$address/$reading => $value";
|
||||
if(defined($value)) {
|
||||
$value= trim($value) if(AttrVal($hash,"trimvalues",1));
|
||||
my @getters= @{$hash->{fhem}{getters}};
|
||||
@ -201,7 +202,7 @@ OWDevice_UpdateValues($) {
|
||||
readingsBeginUpdate($hash);
|
||||
foreach my $reading (@polls) {
|
||||
my $value= OWDevice_ReadValue($hash,$reading);
|
||||
readingsBulkUpdate($hash,$reading,$value);
|
||||
readingsBulkUpdate($hash,$reading,$value) if(defined($value));
|
||||
}
|
||||
readingsEndUpdate($hash,1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user