From 2edafe65206ce9915693d7c63e0ed2e46a62e7d4 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Fri, 3 Jan 2014 16:47:19 +0000 Subject: [PATCH] changed #{...} to @{...} git-svn-id: https://svn.fhem.de/fhem/trunk@4548 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/31_LightScene.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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}}