2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

30_HUEBridge.pm: document autocreate command

git-svn-id: https://svn.fhem.de/fhem/trunk@7286 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2014-12-21 17:03:42 +00:00
parent 909e44d7ed
commit 2b8c5a58fb

View File

@ -202,10 +202,10 @@ HUEBridge_Set($@)
$hash->{STATE} = "updating";
return "starting update";
} elsif($cmd eq 'autocreate') {
HUEBridge_Autocreate($hash);
HUEBridge_Autocreate($hash,1);
return undef;
} else {
my $list = "statusRequest:noArg";
my $list = "autocreate:noArg statusRequest:noArg";
$list .= " swupdate:noArg" if( defined($hash->{updatestate}) && $hash->{updatestate} == 2 );
return "Unknown argument $cmd, choose one of $list";
}
@ -272,15 +272,17 @@ HUEBridge_GetUpdate($)
}
sub
HUEBridge_Autocreate($)
HUEBridge_Autocreate($;$)
{
my ($hash)= @_;
my ($hash,$force)= @_;
my $name = $hash->{NAME};
if( !$force ) {
foreach my $d (keys %defs) {
next if($defs{$d}{TYPE} ne "autocreate");
return undef if(AttrVal($defs{$d}{NAME},"disable",undef));
}
}
my $result = HUEBridge_Call($hash, 'lights', undef);
foreach my $key ( keys %$result ) {
@ -583,6 +585,8 @@ HUEBridge_HTTP_Request($$$@)
<a name="HUEBridge_Set"></a>
<b>Set</b>
<ul>
<li>autocreate<br>
Create fhem devices for all bridge devices.</li>
<li>statusRequest<br>
Update bridge status.</li>
<li>swupdate<br>