mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-09 20:57:11 +00:00
FB_CALLLIST: delete readings on set command "clear"
git-svn-id: https://svn.fhem.de/fhem/trunk@13304 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6cf0621f7d
commit
914c245b68
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user