diff --git a/fhem/FHEM/31_LightScene.pm b/fhem/FHEM/31_LightScene.pm index 2810799cb..b193880a8 100644 --- a/fhem/FHEM/31_LightScene.pm +++ b/fhem/FHEM/31_LightScene.pm @@ -384,7 +384,7 @@ LightScene_Set($@) $get = $2 if( $2 ); $set = $5 if( $5 ); } - ($get,$regex) = split('#', $get, 2); + ($get,$regex) = split('@', $get, 2); $set = "state" if( $set eq "STATE" ); $saved .= "$set " if( $set ne "state" ); @@ -612,14 +612,14 @@ LightScene_Get($@)
  • 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 - by the device). each reading can have a perl expression appended with '#' that will be used to alter the $value used for + by the device). each reading can have a perl expression appended with '@' that will be used to alter the $value used for the set command. this can for example be used to strip a trailing % from a dimmer state. in addition to reading names the list can also contain expressions of the form abc -> xyz or get cba -> set uvw to map reading abc to set xyz or get cba to set uvw. the list can be given as a string or as a perl expression enclosed in {} that returns this string.
    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}}
    + attr myDimmer lightSceneParamsToSave state@{if($value=~m/(\d+)/){$1}else{$value}}