diff --git a/fhem/CHANGED b/fhem/CHANGED index 11f285279..13f9bddc0 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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 diff --git a/fhem/FHEM/37_NotifyAndroidTV.pm b/fhem/FHEM/37_NotifyAndroidTV.pm index d1b970e15..29dd91ca1 100644 --- a/fhem/FHEM/37_NotifyAndroidTV.pm +++ b/fhem/FHEM/37_NotifyAndroidTV.pm @@ -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/
/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($$$) Set