diff --git a/fhem/CHANGED b/fhem/CHANGED index 89e4b965f..3ed1b404e 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: FB_CALLIST: cleanup readings on set command clear - update: 88_HMCCU.pm: version 3.9.001 with minor changes - update: 98_DOIFtools: add attribute to move event monitor directly above readings section in detail view of DOIF diff --git a/fhem/FHEM/72_FB_CALLLIST.pm b/fhem/FHEM/72_FB_CALLLIST.pm index 3238d305f..d61001c1a 100755 --- a/fhem/FHEM/72_FB_CALLLIST.pm +++ b/fhem/FHEM/72_FB_CALLLIST.pm @@ -252,6 +252,21 @@ sub FB_CALLLIST_Set($@) { delete($hash->{helper}{DATA}) if(exists($hash->{helper}{DATA})); + if(AttrVal($name, "create-readings", "0") eq "1") + { + readingsBeginUpdate($hash); + readingsBulkUpdate($hash, "numberOfCalls", 0); + + for my $reading (keys %{$hash->{READINGS}}) + { + readingsBulkUpdate($hash, $reading, ""); + } + + readingsEndUpdate($hash, 1); + + CommandDeleteReading($hash->{CL}, $name.' \d+-.*'); + } + # Inform all FHEMWEB clients FB_CALLLIST_updateFhemWebClients($hash);