mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
deactivated with cmd1_gt or cmd2_lt
git-svn-id: https://svn.fhem.de/fhem/trunk@5903 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
610a395351
commit
6f3e02a5a7
@ -243,7 +243,7 @@ THRESHOLD_Define($$$)
|
|||||||
{
|
{
|
||||||
my $mode="external";
|
my $mode="external";
|
||||||
readingsBulkUpdate ($hash, "cmd", "wait for next cmd");
|
readingsBulkUpdate ($hash, "cmd", "wait for next cmd");
|
||||||
readingsBulkUpdate ($hash, "mode", "external");
|
readingsBulkUpdate ($hash, "mode",$mode);
|
||||||
}
|
}
|
||||||
readingsEndUpdate ($hash, 1);
|
readingsEndUpdate ($hash, 1);
|
||||||
# my $msg = THRESHOLD_Check($hash);
|
# my $msg = THRESHOLD_Check($hash);
|
||||||
@ -293,6 +293,21 @@ THRESHOLD_Set($@)
|
|||||||
readingsEndUpdate ($hash, 1);
|
readingsEndUpdate ($hash, 1);
|
||||||
return THRESHOLD_Check($hash);
|
return THRESHOLD_Check($hash);
|
||||||
} elsif ($arg eq "deactivated" ) {
|
} elsif ($arg eq "deactivated" ) {
|
||||||
|
if ($value ne "") {
|
||||||
|
if ($value eq "cmd1_gt" ) {
|
||||||
|
readingsBeginUpdate ($hash);
|
||||||
|
THRESHOLD_setValue ($hash,1);
|
||||||
|
THRESHOLD_set_state ($hash);
|
||||||
|
readingsEndUpdate ($hash, 1);
|
||||||
|
} elsif ($value eq "cmd2_lt" ) {
|
||||||
|
readingsBeginUpdate ($hash);
|
||||||
|
THRESHOLD_setValue ($hash,2);
|
||||||
|
THRESHOLD_set_state ($hash);
|
||||||
|
readingsEndUpdate ($hash, 1);
|
||||||
|
} else {
|
||||||
|
return "$pn: set deactivated: $value, unknown command";
|
||||||
|
}
|
||||||
|
}
|
||||||
$ret=CommandAttr(undef, "$pn disable 1");
|
$ret=CommandAttr(undef, "$pn disable 1");
|
||||||
} elsif ($arg eq "active" ) {
|
} elsif ($arg eq "active" ) {
|
||||||
return "$pn: set active, set desired value first" if ($desired_value eq "");
|
return "$pn: set active, set desired value first" if ($desired_value eq "");
|
||||||
@ -844,8 +859,9 @@ THRESHOLD_setValue($$)
|
|||||||
Set the desired value. If no desired value is set, the module is not active.
|
Set the desired value. If no desired value is set, the module is not active.
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li> <code>set <name> deactivated <value><br></code>
|
<li><code>set <name> deactivated <command><br></code>
|
||||||
Module is disabled.
|
Module is disabled.<br>
|
||||||
|
<command> is optional. It can be "cmd1_gt" or "cmd2_lt" passed in order to achieve a defined state before disabling the module.
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li> <code>set <name> active <value><br></code>
|
<li> <code>set <name> active <value><br></code>
|
||||||
@ -1219,8 +1235,9 @@ THRESHOLD_setValue($$)
|
|||||||
Sollwert-Vorgabe durch einen Sensor wird hiermit übersteuert, solange bis "set external" gesetzt wird.
|
Sollwert-Vorgabe durch einen Sensor wird hiermit übersteuert, solange bis "set external" gesetzt wird.
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li><code>set <name> deactivated <value><br></code>
|
<li><code>set <name> deactivated <command><br></code>
|
||||||
Modul wird deaktiviert.
|
Modul wird deaktiviert.<br>
|
||||||
|
<command> ist optional. Es kann "cmd1_gt" oder "cmd2_lt" übergeben werden, um vor dem Deaktivieren des Moduls einen definierten Zustand zu erreichen.
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li><code>set <name> active<br></code>
|
<li><code>set <name> active<br></code>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user