2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 07:19:24 +00:00

31_LightScene.pm: added showDeviceCurrentState attribute

git-svn-id: https://svn.fhem.de/fhem/trunk@12528 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2016-11-08 12:39:32 +00:00
parent bf8aaf5576
commit d37a6b08e1

View File

@ -29,7 +29,7 @@ sub LightScene_Initialize($)
$hash->{SetFn} = "LightScene_Set"; $hash->{SetFn} = "LightScene_Set";
$hash->{GetFn} = "LightScene_Get"; $hash->{GetFn} = "LightScene_Get";
$hash->{AttrFn} = "LightScene_Attr"; $hash->{AttrFn} = "LightScene_Attr";
$hash->{AttrList} = "async_delay followDevices:1,2 lightSceneRestoreOnlyIfChanged:1,0 switchingOrder ". $readingFnAttributes; $hash->{AttrList} = "async_delay followDevices:1,2 lightSceneRestoreOnlyIfChanged:1,0 showDeviceCurrentState:1,0 switchingOrder ". $readingFnAttributes;
$hash->{FW_detailFn} = "LightScene_detailFn"; $hash->{FW_detailFn} = "LightScene_detailFn";
$data{FWEXT}{"/LightScene"}{FUNC} = "LightScene_CGI"; #mod $data{FWEXT}{"/LightScene"}{FUNC} = "LightScene_CGI"; #mod
@ -113,8 +113,8 @@ LightScene_2html($)
$ret .= "<tr><td><div class=\"devType\"><a href=\"$FW_ME?detail=$name\">".AttrVal($name, "alias", $name)."</a></div></td></tr>" if( $show_heading ); $ret .= "<tr><td><div class=\"devType\"><a href=\"$FW_ME?detail=$name\">".AttrVal($name, "alias", $name)."</a></div></td></tr>" if( $show_heading );
$ret .= "<tr><td><table class=\"block wide\">"; $ret .= "<tr><td><table class=\"block wide\">";
if( defined($FW_webArgs{detail}) ) { if( defined($FW_webArgs{detail}) || AttrVal($name,"showDeviceCurrentState",undef) ) {
$room = "&detail=$FW_webArgs{detail}"; $room = "&detail=$FW_webArgs{detail}" if( defined($FW_webArgs{detail}) );
$ret .= sprintf("<tr class=\"%s\">", ($row&1)?"odd":"even"); $ret .= sprintf("<tr class=\"%s\">", ($row&1)?"odd":"even");
#$row++; #$row++;
@ -1070,6 +1070,8 @@ LightScene_editTable($) {
1 -> if no match is found state will be unchanged and a nomatch event will be triggered.<br> 1 -> if no match is found state will be unchanged and a nomatch event will be triggered.<br>
2 -> if no match is found state will be set to unknown. depending on the scene and devices state can toggle multiple 2 -> if no match is found state will be set to unknown. depending on the scene and devices state can toggle multiple
times. use a watchdog if you want to handle this.</li> times. use a watchdog if you want to handle this.</li>
<li>showDeviceCurrentState<br>
show the current state of member devices in weblink</li>
<li>switchingOrder<br> <li>switchingOrder<br>
space separated list of &lt;scene&gt;:&lt;deviceList&gt; items that will give a per scene order space separated list of &lt;scene&gt;:&lt;deviceList&gt; items that will give a per scene order
in which the devices should be switched.<br> in which the devices should be switched.<br>