diff --git a/fhem/FHEM/31_LightScene.pm b/fhem/FHEM/31_LightScene.pm
index 23db0d257..2f4a4471f 100644
--- a/fhem/FHEM/31_LightScene.pm
+++ b/fhem/FHEM/31_LightScene.pm
@@ -29,7 +29,7 @@ sub LightScene_Initialize($)
$hash->{SetFn} = "LightScene_Set";
$hash->{GetFn} = "LightScene_Get";
$hash->{AttrFn} = "LightScene_Attr";
- $hash->{AttrList} = "followDevices:1 switchingOrder ". $readingFnAttributes;
+ $hash->{AttrList} = "followDevices:1,2 switchingOrder ". $readingFnAttributes;
$hash->{FW_detailFn} = "LightScene_detailFn";
$data{FWEXT}{"/LightScene"}{FUNC} = "LightScene_CGI"; #mod
@@ -311,8 +311,13 @@ LightScene_Notify($$)
readingsSingleUpdate($hash, "state", $scene, 1 ) if( $matched );
last if( $matched );
}
- DoTrigger( $name, "nomatch" ) if( !$matched );
-
+ if( !$matched ) {
+ if( $hash->{followDevices} == 2 ) {
+ readingsSingleUpdate($hash, "state", "unknown", 1 );
+ } else {
+ DoTrigger( $name, "nomatch" )
+ }
+ }
}
}
}
@@ -943,11 +948,13 @@ LightScene_editTable($) {
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
+ 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
- 1 -> the LightScene tries to follow the switching state of the devices and set its state to the name of the
- scene that matches. if no match is found state will be unchanged.
+ 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.
switchingOrder
space separated list of <scene>:<deviceList> items that will give a per scene order
in which the devices should be switched.