mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
changed #{...} to @{...}
git-svn-id: https://svn.fhem.de/fhem/trunk@4548 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
031bcce0e2
commit
2edafe6520
@ -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($@)
|
||||
<li>lightSceneParamsToSave<br>
|
||||
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 <code>abc -> xyz</code>
|
||||
or <code>get cba -> set uvw</code> 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.<br>
|
||||
<code>attr myReceiver lightSceneParamsToSave volume,channel</code></br>
|
||||
<code>attr myHueDevice lightSceneParamsToSave {(Value($DEVICE) eq "off")?"state":"bri : xy"}</code></li>
|
||||
<code>attr myDimmer lightSceneParamsToSave state#{if($value=~m/(\d+)/){$1}else{$value}}</code></br>
|
||||
<code>attr myDimmer lightSceneParamsToSave state@{if($value=~m/(\d+)/){$1}else{$value}}</code></br>
|
||||
</ul><br>
|
||||
</ul>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user