2
0
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:
borisneubert 2013-01-03 18:22:14 +00:00
parent ea3721500a
commit 53e6569fff

View File

@ -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);
}