2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

37_NotifyAndroidTV.pm: added image={<perlCode>}

git-svn-id: https://svn.fhem.de/fhem/trunk@16130 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2018-02-09 08:50:10 +00:00
parent 6e1772ab1b
commit 4098787375

View File

@ -225,7 +225,15 @@ NotifyAndroidTV_Set($$@)
my $image;
if( $param_h->{image} ) {
if( $param_h->{image} && $param_h->{image} =~ m/^{.*}$/ ) {
$image = eval $param_h->{image};
if( $@ ) {
Log3 $name, 5, "$name: $@";
return $@;
}
return "empty image returned from perl code" if(!$image);
} elsif( $param_h->{image} ) {
#$param_h->{image} .= ".jpg" if( $param_h->{image} !~ '\.' );
#$param_h->{image} = "$FW_icondir/default/$param_h->{image}" if( $param_h->{image} !~ '^/' );
@ -350,7 +358,8 @@ NotifyAndroidTV_Attr($$$)
<ul>
<li>msg [options] &lt;message&gt;<br>
possible options are: bkgcolor, interrupt, position, transparency, duration, offset, offsety, width, type, icon, image, title, imageurl. use <code>set &lt;name&gt; notify</code> to see valid values.<br>
it is better to use imageurl instad of image as it is non blocking!</li>
it is better to use imageurl instad of image as it is non blocking!<br>
image can be given as <code>image={&lt;perlCode&gt;}</code></li>
</ul><br>
<a name="NotifyAndroidTV_Get"></a>