mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 10:46:53 +00:00
37_NotifyAndroidTV.pm: added fontsize parameter
fixed default.* attributes git-svn-id: https://svn.fhem.de/fhem/trunk@21245 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0b3fbe6a7f
commit
a7482a455a
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- feature: 37_NotifyAndroidTV.pm added fontsize parameter
|
||||
- change: 73_DoorBird: Added wiki link
|
||||
- feature: 39_alexa.pm: support for proactive event reporting
|
||||
- change: 98_weekprofile: change file functions to support configdb
|
||||
|
@ -18,11 +18,11 @@ my $options = { position => { 'bottom-right' => 0,
|
||||
'center' => 4,
|
||||
},
|
||||
width => { 'default' => 0,
|
||||
'narrow' => 1,
|
||||
'small' => 2,
|
||||
'wide' => 3,
|
||||
'extrawide' => 4,
|
||||
},
|
||||
'narrow' => 1,
|
||||
'small' => 2,
|
||||
'wide' => 3,
|
||||
'extrawide' => 4,
|
||||
},
|
||||
transparency => { 'default' => 0,
|
||||
'0%' => 1,
|
||||
'25%' => 2,
|
||||
@ -50,6 +50,11 @@ my $options = { position => { 'bottom-right' => 0,
|
||||
'noimage' => 4,
|
||||
'short' => 5,
|
||||
},
|
||||
fontsize => { 'default' => 2,
|
||||
'small' => 1,
|
||||
'medium' => 2,
|
||||
'large' => 3,
|
||||
},
|
||||
duration => undef,
|
||||
offset => undef,
|
||||
offsety => undef,
|
||||
@ -150,8 +155,16 @@ NotifyAndroidTV_Set($$@)
|
||||
|
||||
my $list = 'msg';
|
||||
|
||||
my ($param_a, $param_h) = parseParams(\@params);
|
||||
|
||||
if( $cmd && ($cmd eq 'msg' || $cmd eq 'notify') ) {
|
||||
my ($param_a, $param_h) = parseParams(\@params);
|
||||
foreach my $option (keys %{$options}) {
|
||||
if( !defined($param_h->{$option}) ) {
|
||||
if( my $default = AttrVal($name, "default". ucfirst $option, undef) ) {
|
||||
$param_h->{$option} = $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $txt = join( ' ', @{$param_a} );
|
||||
$txt =~ s/\n/<br>/g;
|
||||
@ -176,14 +189,6 @@ NotifyAndroidTV_Set($$@)
|
||||
|
||||
return "error: $error" if( $error );
|
||||
|
||||
foreach my $option (keys %{$options}) {
|
||||
if( !defined($param_h->{$option}) ) {
|
||||
if( my $default = AttrVal($name, "default". ucfirst $option, undef) ) {
|
||||
$param_h->{$option} = $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$param_h->{offset} = 0 if( !$param_h->{offset} );
|
||||
$param_h->{offsety} = 0 if( !$param_h->{offsety} );
|
||||
$param_h->{transparency} = 0 if( !$param_h->{transparency} );
|
||||
@ -357,7 +362,7 @@ NotifyAndroidTV_Attr($$$)
|
||||
<b>Set</b>
|
||||
<ul>
|
||||
<li>msg [options] <message><br>
|
||||
possible options are: bkgcolor, interrupt, position, transparency, duration, offset, offsety, width, type, icon, image, title, imageurl. use <code>set <name> notify</code> to see valid values.<br>
|
||||
possible options are: bkgcolor, interrupt, position, transparency, duration, offset, offsety, width, type, fontsize, icon, image, title, imageurl. use <code>set <name> notify</code> to see valid values.<br>
|
||||
<code>set nb msg ?</code> shows a help text<br>
|
||||
it is better to use imageurl instad of image as it is non blocking!<br>
|
||||
image can be given as <code>image={<perlCode>}</code></li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user