mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
31_LightScene.pm: workaround for global $scn and multiple tabs
git-svn-id: https://svn.fhem.de/fhem/trunk@16181 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c747ad9503
commit
6c27581126
@ -942,6 +942,17 @@ LightScene_editTable($) {
|
||||
$dd.=FW_hidden("detail",$hash->{NAME}) . "\n";
|
||||
$dd.="</form>\n";
|
||||
# make table
|
||||
my @devices;
|
||||
if( $scn && defined($hash->{SCENES}{$scn}) ) {
|
||||
if( defined($hash->{switchingOrder}) && defined($hash->{switchingOrder}{$scn}) ) {
|
||||
@devices = @{$hash->{switchingOrder}{$scn}};
|
||||
} else {
|
||||
@devices = @{$hash->{devices}};
|
||||
}
|
||||
} else {
|
||||
$scn = '';
|
||||
}
|
||||
|
||||
if ($scn eq "Choose scene" || $scn eq '') {
|
||||
$html.="<table><tr><td>Edit scene</td><td>$dd</td></tr>";
|
||||
} else {
|
||||
@ -949,12 +960,6 @@ LightScene_editTable($) {
|
||||
$html .= '<table class="block wide">';
|
||||
$html .= '<tr><th>Device</th><th>Command</th></tr>'."\n";
|
||||
my $row=0;
|
||||
my @devices;
|
||||
if( $scn && defined($hash->{switchingOrder}) && defined($hash->{switchingOrder}{$scn}) ) {
|
||||
@devices = @{$hash->{switchingOrder}{$scn}};
|
||||
} else {
|
||||
@devices = @{$hash->{devices}};
|
||||
}
|
||||
#table rows
|
||||
my @cmds = qw(set setcmd);
|
||||
my $set = "set $hash->{NAME} set $scn";
|
||||
|
Loading…
x
Reference in New Issue
Block a user