diff --git a/fhem/FHEM/31_LightScene.pm b/fhem/FHEM/31_LightScene.pm
index 53b9a9209..43c7f82b0 100644
--- a/fhem/FHEM/31_LightScene.pm
+++ b/fhem/FHEM/31_LightScene.pm
@@ -5,7 +5,7 @@ package main;
use strict;
use warnings;
-use POSIX;
+#use POSIX;
#use JSON;
#use Data::Dumper;
@@ -56,14 +56,15 @@ sub LightScene_Define($$)
$hash->{HAS_JSON} = $LightScene_hasJSON;
$hash->{HAS_DataDumper} = $LightScene_hasDataDumper;
+ $hash->{CONFIGFILE} = myStatefileName();
my %list;
foreach my $a (@args) {
foreach my $d (devspec2array($a)) {
$list{$d} = 1;
- addToDevAttrList( $d, "lightSceneParamsToSave" );
- addToDevAttrList( $d, "lightSceneRestoreOnlyIfChanged:1,0" );
+ addToDevAttrList( $d, "lightSceneParamsToSave", 'LightScene' );
+ addToDevAttrList( $d, "lightSceneRestoreOnlyIfChanged:1,0", 'LightScene' );
}
}
$hash->{CONTENT} = \%list;
@@ -1012,20 +1013,22 @@ LightScene_editTable($) {
}
1;
+__END__
+
=pod
=item helper
=item summary create scenes from multiple fhem devices
=item summary_DE verwaltet Szenen aus mehreren FHEM Geräten
=begin html
-
+
LightScene
Allows to store the state of a group of lights and other devices and recall it later.
Multiple states for one group can be stored.
-
+
Define
define <name> LightScene [<dev1>] [<dev2>] [<dev3>] ...
@@ -1049,7 +1052,7 @@ LightScene_editTable($) {
A weblink with a scene overview that can be included in any room or a floorplan can be created with:
define wlScene weblink htmlCode {LightScene_2html("LightSceneName")}
-
+
Set
- all <command>
@@ -1079,17 +1082,17 @@ LightScene_editTable($) {
rename <scene_old_name> to <scene_new_name>
-
+
Get
- scenes
- scene <scene_name>
-
+
Attributes
-
+
- async_delay
If this attribute is defined, unfiltered set commands will not be
executed in the clients immediately. Instead, they are added to a queue
@@ -1098,6 +1101,7 @@ LightScene_editTable($) {
timercalls is given by the value of async_delay (in seconds) and may be
0 for fastest possible execution.
+
- lightSceneParamsToSave
this attribute can be set on the devices to be included in a scene. it is set to a comma separated list of readings
that will be saved. multiple readings separated by : are collated in to a single set command (this has to be supported
@@ -1110,18 +1114,22 @@ LightScene_editTable($) {
attr myReceiver lightSceneParamsToSave volume,channel
attr myHueDevice lightSceneParamsToSave {(Value($DEVICE) eq "off")?"state":"bri : xy"}
attr myDimmer lightSceneParamsToSave state@{if($value=~m/(\d+)/){$1}else{$value}}
+
- lightSceneRestoreOnlyIfChanged
this attribute can be set on the lightscene and/or on the individual devices included in a scene.
the device settings have precedence over the scene setting.
1 -> for each device do nothing if current device state is the same as the saved state
0 -> always set the state even if the current state is the same as the saved state. this is the default
+
- followDevices
the LightScene tries to follow the switching state of the devices set its state to the name of the scene that matches.
1 -> if no match is found state will be unchanged and a nomatch event will be triggered.
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.
+
- showDeviceCurrentState
show the current state of member devices in weblink
+
- switchingOrder
space separated list of <scene>:<deviceList> items that will give a per scene order
in which the devices should be switched.
@@ -1133,6 +1141,7 @@ LightScene_editTable($) {
define media LightScene TV,DVD,Amplifier,masterPower
attr media switchingOrder .*On:masterPower,.* allOff:!.*,masterPower
+
- traversalOrder
comma separated list of scene names that should be traversed by the prevoiusScene and nextScene commands.
default not set -> all scenes will be traversed in alphabetical order