mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-28 02:44:53 +00:00
setList added to dummy
git-svn-id: https://svn.fhem.de/fhem/trunk@1422 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
84fd8f9cd0
commit
02203c74af
fhem
@ -21,9 +21,9 @@
|
||||
- feature: remove dependency on Google::Weather, major rewrite (Boris)
|
||||
- feature: started experimental interface implementation (fhem API v2) (Boris)
|
||||
- feature: sleep issued in at/notify/etc is not blocking fhem anymore
|
||||
- feature: dummy got a setList attribute
|
||||
- feature: new module 02_RSS.pm
|
||||
|
||||
|
||||
- 2011-12-31 (5.2)
|
||||
- bugfix: applying smallscreen attributes to firefox/opera
|
||||
- feature: CUL_TX added (thanks to Peterp)
|
||||
|
@ -12,7 +12,7 @@ dummy_Initialize($)
|
||||
|
||||
$hash->{SetFn} = "dummy_Set";
|
||||
$hash->{DefFn} = "dummy_Define";
|
||||
$hash->{AttrList} = "loglevel:0,1,2,3,4,5,6";
|
||||
$hash->{AttrList} = "loglevel:0,1,2,3,4,5,6 setList";
|
||||
}
|
||||
|
||||
###################################
|
||||
@ -20,13 +20,13 @@ sub
|
||||
dummy_Set($@)
|
||||
{
|
||||
my ($hash, @a) = @_;
|
||||
|
||||
return "no set value specified" if(int(@a) < 2);
|
||||
return "Unknown argument $a[1], choose one of *" if($a[1] eq "?");
|
||||
|
||||
my $name = shift @a;
|
||||
my $v = join(" ", @a);
|
||||
|
||||
return "no set value specified" if(int(@a) < 1);
|
||||
my $setList = AttrVal($name, "setList", "*");
|
||||
return "Unknown argument ?, choose one of $setList" if($a[0] eq "?");
|
||||
|
||||
my $v = join(" ", @a);
|
||||
Log GetLogLevel($name,2), "dummy set $name $v";
|
||||
|
||||
$hash->{CHANGED}[0] = $v;
|
||||
|
@ -8663,8 +8663,9 @@ AB600, Duewi, DomiaLite, COCO) and others. <br>
|
||||
delstruct commands. Each attached device will get the attribute
|
||||
<struct_type>=<name><br> when it is added to the list, and the
|
||||
attribute will be deleted if the device is deleted from the structure.
|
||||
The structure devices can also be added to a structure, e.g. you can have
|
||||
a building consisting of levels which consists of rooms of devices.
|
||||
Exception to this are the attributes room and alias. The structure devices
|
||||
can also be added to a structure, e.g. you can have a building consisting
|
||||
of levels which consists of rooms of devices.
|
||||
<br>
|
||||
Example:<br>
|
||||
<ul>
|
||||
@ -9078,6 +9079,11 @@ AB600, Duewi, DomiaLite, COCO) and others. <br>
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
<li><a href="#loglevel">loglevel</a></li>
|
||||
<li><a name="setList">setList</a><br>
|
||||
Space separated list of commands, which will be returned upon "set name ?",
|
||||
so the FHEMWEB frontend can construct a dropdown and offer on/off
|
||||
switches. Example: attr dummyName setList on off
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
|
@ -2060,7 +2060,7 @@ FW_devState($$)
|
||||
$txt = "<a onClick=\"location.href='$FW_ME$FW_subdir?$link$rf'\">$txt</a>";
|
||||
|
||||
} else {
|
||||
$txt = "<a href=\"$FW_ME$FW_subdir?$link\">$txt</a>";
|
||||
$txt = "<a href=\"$FW_ME$FW_subdir?$link$rf\">$txt</a>";
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user