mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
FULLY: Added attribute disable
git-svn-id: https://svn.fhem.de/fhem/trunk@15968 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e71ff85cf8
commit
6b094795dd
@ -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.
|
||||
- feature: 89_FULLY: Added support for attribute disable
|
||||
- change: 93_DbLog: V3.7.0, log verbose 5 enhanced, configuration read check
|
||||
added to configCheck
|
||||
- feature: 74_Unifi: new Readings for WLAN-states, fixed Warning
|
||||
|
@ -55,6 +55,7 @@ sub FULLY_Initialize ($)
|
||||
$hash->{parseParams} = 1;
|
||||
|
||||
$hash->{AttrList} = "pingBeforeCmd:0,1,2 pollInterval requestTimeout repeatCommand:0,1,2 " .
|
||||
"disable:0,1 " .
|
||||
$readingFnAttributes;
|
||||
}
|
||||
|
||||
@ -189,6 +190,9 @@ sub FULLY_Set ($@)
|
||||
"lock" => "enabledLockedMode", "unlock" => "disableLockedMode"
|
||||
);
|
||||
|
||||
my $disable = AttrVal ($name, 'disable', 0);
|
||||
return undef if ($disable);
|
||||
|
||||
if (exists ($cmds{$opt})) {
|
||||
$response = FULLY_Execute ($hash, $cmds{$opt}, undef, 1);
|
||||
}
|
||||
@ -277,6 +281,9 @@ sub FULLY_Get ($@)
|
||||
my $options = "info:noArg stats:noArg update:noArg";
|
||||
my $response;
|
||||
|
||||
my $disable = AttrVal ($name, 'disable', 0);
|
||||
return undef if ($disable);
|
||||
|
||||
if ($opt eq 'info') {
|
||||
my $result = FULLY_Execute ($hash, 'deviceInfo', undef, 1);
|
||||
if (!defined ($result) || $result eq '') {
|
||||
@ -373,8 +380,9 @@ sub FULLY_UpdateDeviceInfo ($)
|
||||
{
|
||||
my ($hash) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
my $disable = AttrVal ($name, 'disable', 0);
|
||||
|
||||
if (!exists ($hash->{fully}{bc})) {
|
||||
if (!exists ($hash->{fully}{bc}) && $disable == 0) {
|
||||
$hash->{fully}{bc} = BlockingCall ("FULLY_GetDeviceInfo", $name, "FULLY_GotDeviceInfo",
|
||||
120, "FULLY_Abort", $hash);
|
||||
}
|
||||
@ -641,6 +649,9 @@ sub FULLY_Ping ($$)
|
||||
<b>Attributes</b><br/>
|
||||
<br/>
|
||||
<ul>
|
||||
<li><b>disable <0 | 1></b><br/>
|
||||
Disable device and automatic polling.
|
||||
</li><br/>
|
||||
<li><b>pingBeforeCmd <Count></b><br/>
|
||||
Send <i>Count</i> ping request to tablet before executing commands. Valid values
|
||||
for <i>Count</i> are 0,1,2. Default is 0 (do not send ping request).
|
||||
|
Loading…
x
Reference in New Issue
Block a user