From efca107891347e7093fa94485cb2ba8529fa2514 Mon Sep 17 00:00:00 2001 From: Ellert Date: Wed, 1 Nov 2017 11:02:53 +0000 Subject: [PATCH] 98_DOIFtools: unattended save removed, Forum(78769) git-svn-id: https://svn.fhem.de/fhem/trunk@15374 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 5 +++++ fhem/FHEM/98_DOIFtools.pm | 19 +++++-------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index beba8be66..84923b985 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,10 @@ # 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. + - feature: 98_DOIFtools: unattended save removed, Forum(78769) + DOIFtools will perform save if allowed by + attribute DOIFtoolsExecuteSave when creating automatically a + readingsGroup for DOIF, an userReadings for DOIF, a DOIFtoolsLog + or an icon for DOIF by user request - feature: 74_XiaomiFlowerMonitor: add attribut for Blocking.pm logoutput - bugfix: 14_CUL_TCM97001: Bug: "other state" bei W174, Plausibility check for W174, Append documentation diff --git a/fhem/FHEM/98_DOIFtools.pm b/fhem/FHEM/98_DOIFtools.pm index 54043b38f..d94d68701 100644 --- a/fhem/FHEM/98_DOIFtools.pm +++ b/fhem/FHEM/98_DOIFtools.pm @@ -640,7 +640,7 @@ sub DOIFtools_Notify($$) { CommandDeleteAttr(undef,"$pn readingsPrefix") if (AttrVal($pn,"readingsPrefix","")); CommandAttr(undef,"$pn DOIFtoolsEventMonitorInDOIF ".AttrVal($pn,"eventMonitorInDOIF","")) if (AttrVal($pn,"eventMonitorInDOIF","")); CommandDeleteAttr(undef,"$pn eventMonitorInDOIF") if (AttrVal($pn,"eventMonitorInDOIF","")); - CommandSave(undef,undef); + # CommandSave(undef,undef); } # Event monitor in DOIF FW_detailFn if ($modules{DOIF}{LOADED} and (!$modules{DOIF}->{FW_detailFn} or $modules{DOIF}->{FW_detailFn} and $modules{DOIF}->{FW_detailFn} ne "DOIFtools_eM") and $sn eq "global" and $event =~ "^INITIALIZED\$" ) { @@ -1071,7 +1071,7 @@ sub DOIFtools_Define($$$) my @Liste = devspec2array("TYPE=DOIFtools"); if (@Liste > 1) { CommandDelete(undef,$pn); - CommandSave(undef,undef); + # CommandSave(undef,undef); return "Only one instance of DOIFtools is allowed per FHEM installation. Delete the old one first."; } $hash->{STATE} = "initialized"; @@ -1089,27 +1089,18 @@ sub DOIFtools_Attr(@) my $value = (defined $a[3]) ? $a[3] : ""; my $hash = $defs{$pn}; my $ret=""; - if ($init_done and $attr eq "DOIFtoolsEventMonitorInDOIF") { - # if (!defined $modules{DOIF}->{FW_detailFn} and $cmd eq "set" and $value) { - # $modules{DOIF}->{FW_detailFn} = "DOIFtools_eM"; - # readingsSingleUpdate($hash,".DOIFdO",$modules{DOIF}->{FW_deviceOverview},0); - # $modules{DOIF}->{FW_deviceOverview} = 1; - # } elsif ($modules{DOIF}->{FW_detailFn} eq "DOIFtools_eM" and ($cmd eq "del" or !$value)) { - # delete $modules{DOIF}->{FW_detailFn}; - # $modules{DOIF}->{FW_deviceOverview} = ReadingsVal($pn,".DOIFdO",""); - # } - } elsif ($init_done and $attr eq "DOIFtoolsMenuEntry") { + if ($init_done and $attr eq "DOIFtoolsMenuEntry") { if ($cmd eq "set" and $value) { if (!(AttrVal($FW_wname, "menuEntries","") =~ m/(DOIFtools\,$FW_ME\?detail\=DOIFtools\,)/)) { CommandAttr(undef, "$FW_wname menuEntries DOIFtools,$FW_ME?detail=DOIFtools,".AttrVal($FW_wname, "menuEntries","")); - CommandSave(undef, undef); + # CommandSave(undef, undef); } } elsif ($init_done and $cmd eq "del" or !$value) { if (AttrVal($FW_wname, "menuEntries","") =~ m/(DOIFtools\,$FW_ME\?detail\=DOIFtools\,)/) { my $me = AttrVal($FW_wname, "menuEntries",""); $me =~ s/DOIFtools\,$FW_ME\?detail\=DOIFtools\,//; CommandAttr(undef, "$FW_wname menuEntries $me"); - CommandSave(undef, undef); + # CommandSave(undef, undef); } }