mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
98_autocreate.pm/fhem.pl: introduce global autosave (Forum #39985)
git-svn-id: https://svn.fhem.de/fhem/trunk@9108 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
854e7c1ebc
commit
00f8a1d02e
@ -322,7 +322,9 @@ autocreate_Notify($$)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandSave(undef, undef) if(!$ret && $nrcreated && AttrVal($me,"autosave",1));
|
CommandSave(undef, undef) if(!$ret && $nrcreated &&
|
||||||
|
AttrVal($me,"autosave",
|
||||||
|
AttrVal("global","autosave",1)));
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,7 +564,7 @@ CommandUsb($$)
|
|||||||
Log3 undef, 1, "define $define";
|
Log3 undef, 1, "define $define";
|
||||||
my $lret = CommandDefine($cl, $define);
|
my $lret = CommandDefine($cl, $define);
|
||||||
CommandSave(undef, undef)
|
CommandSave(undef, undef)
|
||||||
if(!$lret && AttrVal("autocreate","autosave",1));
|
if(!$lret && AttrVal("global","autosave",1));
|
||||||
}
|
}
|
||||||
|
|
||||||
goto NEXTDEVICE;
|
goto NEXTDEVICE;
|
||||||
@ -659,7 +661,10 @@ autocreate_Attr(@)
|
|||||||
<li>autosave<br>
|
<li>autosave<br>
|
||||||
After creating a device, automatically save the config file with the
|
After creating a device, automatically save the config file with the
|
||||||
command <a href="#save">save</a> command. Default is 1 (i.e. on), set
|
command <a href="#save">save</a> command. Default is 1 (i.e. on), set
|
||||||
it to 0 to switch it off.</li><br>
|
it to 0 to switch it off.<br>
|
||||||
|
<b>Note</b>: this attribute is deprecated, use the global autosave
|
||||||
|
attribute instead.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="device_room"></a>
|
<a name="device_room"></a>
|
||||||
<li>device_room<br>
|
<li>device_room<br>
|
||||||
@ -812,7 +817,10 @@ autocreate_Attr(@)
|
|||||||
Nach der Erzeugung eines neuen Gerätes wird automatisch die
|
Nach der Erzeugung eines neuen Gerätes wird automatisch die
|
||||||
Konfigurationsdatei mit dem Befehl <a href="#save">save</a>
|
Konfigurationsdatei mit dem Befehl <a href="#save">save</a>
|
||||||
gespeichert. Der Standardwert ist 1 (d.h. aktiviert), eine 0 schaltet
|
gespeichert. Der Standardwert ist 1 (d.h. aktiviert), eine 0 schaltet
|
||||||
die automatische Speicherung aus.</li><br>
|
die automatische Speicherung aus.<br>
|
||||||
|
<b>Achtung:</b> Dieses Attribut ist unerwünscht, bitte stattdessen
|
||||||
|
das global autosave Attribut verwenden.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="device_room"></a>
|
<a name="device_room"></a>
|
||||||
<li>device_room<br>
|
<li>device_room<br>
|
||||||
|
@ -1481,6 +1481,13 @@ The following local attributes are used by a wider range of devices:
|
|||||||
<a name="restartDelay"></a>
|
<a name="restartDelay"></a>
|
||||||
<li>restartDelay<br>
|
<li>restartDelay<br>
|
||||||
set the delay for shutdown restart, default is 2 (seconds).
|
set the delay for shutdown restart, default is 2 (seconds).
|
||||||
|
</li><br>
|
||||||
|
|
||||||
|
<a name="autosave"></a>
|
||||||
|
<li>autosave<br>
|
||||||
|
enable some modules to automatically trigger save after a configuration
|
||||||
|
change, e.g. after a new device was created. Default is 1 (true), you
|
||||||
|
can deactivate this feature by setting the value to 0.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1581,8 +1581,16 @@ Die folgenden lokalen Attribute werden von mehreren Geräten verwendet:
|
|||||||
|
|
||||||
<a name="restartDelay"></a>
|
<a name="restartDelay"></a>
|
||||||
<li>restartDelay<br>
|
<li>restartDelay<br>
|
||||||
setzt die Verzögerung beim Neustart mit shutdown restart, die
|
Setzt die Verzögerung beim Neustart mit shutdown restart, die
|
||||||
Voreinstellung ist 2 (Sekunden).
|
Voreinstellung ist 2 (Sekunden).
|
||||||
|
</li><br>
|
||||||
|
|
||||||
|
<a name="autosave"></a>
|
||||||
|
<li>autosave<br>
|
||||||
|
Erlaubt manchen Modulen save auszuführen, nach einer automatischen
|
||||||
|
Änderung der Konfiguration, z.Bsp. nachdem ein Gerät angelegt
|
||||||
|
wurde. Die Voreinstellung ist 1 (wahr), man kann es ausschalten, indem
|
||||||
|
man den Wert auf 0 setzt.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -256,6 +256,7 @@ my @globalAttrList = qw(
|
|||||||
archivecmd
|
archivecmd
|
||||||
archivedir
|
archivedir
|
||||||
autoload_undefined_devices:1,0
|
autoload_undefined_devices:1,0
|
||||||
|
autosave:1,0
|
||||||
backup_before_update
|
backup_before_update
|
||||||
backupcmd
|
backupcmd
|
||||||
backupdir
|
backupdir
|
||||||
|
Loading…
Reference in New Issue
Block a user