diff --git a/fhem/CHANGED b/fhem/CHANGED index 9a0247f78..ba5ed5164 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. + - update: 77_UWZ: New Version 1.4.7 added headlines for weblinks - update: 73_NUKIBridge,74_NUKIDevice: New Version 0.4.0 More Feature get,set ,Callback/Webhook Funktion - change: 98_exportdevice: command was deprecated and moved to contrib in diff --git a/fhem/FHEM/77_UWZ.pm b/fhem/FHEM/77_UWZ.pm index 4198407bf..70aea022d 100644 --- a/fhem/FHEM/77_UWZ.pm +++ b/fhem/FHEM/77_UWZ.pm @@ -60,7 +60,7 @@ use vars qw($readingFnAttributes); use vars qw(%defs); my $MODUL = "UWZ"; -my $version = "1.4.6"; +my $version = "1.4.7"; my $countrycode = "DE"; my $plz = "77777"; @@ -273,6 +273,8 @@ sub UWZ_Initialize($) { "maps ". "humanreadable:0,1 ". "htmlattr ". + "htmltitle ". + "htmltitleclass ". "htmlsequence:ascending,descending ". "lang ". "sort_readings_by:severity,start ". @@ -294,7 +296,7 @@ sub UWZ_Define($$) { my @a = split( "[ \t][ \t]*", $def ); return "Error: Perl moduls ".$missingModul."are missing on this system" if( $missingModul ); - return "Wrong syntax: use define UWZ [CountryCode] [PLZ] [Interval] " if (int(@a) != 5 and ((lc $a[2]) ne "search")); + return "Wrong syntax: use define UWZ " if (int(@a) != 5 and ((lc $a[2]) ne "search")); if ((lc $a[2]) ne "search") { @@ -974,7 +976,9 @@ sub UWZAsHtml($;$) { my $hash = $defs{$name}; my $htmlsequence = AttrVal($name, "htmlsequence", "none"); - + my $htmltitle = AttrVal($name, "htmltitle", ""); + my $htmltitleclass = AttrVal($name, "htmltitleclass", ""); + my $attr; if (AttrVal($name, "htmlattr", "none") ne "none") { @@ -984,13 +988,13 @@ sub UWZAsHtml($;$) { } - if (ReadingsVal($name, "WarnCount", "") != 0 ) { + if (ReadingsVal($name, "WarnCount", 0) != 0 ) { $ret .= '
'; - $ret .= ''; + $ret .= '
'; if ($htmlsequence eq "descending") { - for ( my $i=ReadingsVal($name, "WarnCount", "")-1; $i>=0; $i--){ + for ( my $i=ReadingsVal($name, "WarnCount", -1)-1; $i>=0; $i--){ $ret .= ''; $ret .= ''; $ret .= '
'.$htmltitle.'
'.ReadingsVal($name, "Warn_".$i."_ShortText", "").'

'; @@ -1010,7 +1014,7 @@ sub UWZAsHtml($;$) { } } else { ### - for ( my $i=0; $i
'.ReadingsVal($name, "Warn_".$i."_ShortText", "").'

'; @@ -1039,7 +1043,7 @@ sub UWZAsHtml($;$) { } else { $ret .= '
'; - $ret .= ''; + $ret .= '
'; $ret .= '
'.$htmltitle.'
'; # language by AttrVal if ( $hash->{CountryCode} ~~ [ 'DE', 'AT', 'CH' ] ) { @@ -1064,7 +1068,10 @@ sub UWZAsHtmlLite($;$) { my $ret = ''; my $hash = $defs{$name}; my $htmlsequence = AttrVal($name, "htmlsequence", "none"); + my $htmltitle = AttrVal($name, "htmltitle", ""); + my $htmltitleclass = AttrVal($name, "htmltitleclass", ""); my $attr; + if (AttrVal($name, "htmlattr", "none") ne "none") { $attr = AttrVal($name, "htmlattr", ""); } else { @@ -1074,7 +1081,7 @@ sub UWZAsHtmlLite($;$) { if (ReadingsVal($name, "WarnCount", "") != 0 ) { $ret .= '
'; - $ret .= ''; + $ret .= '
'; if ($htmlsequence eq "descending") { for ( my $i=ReadingsVal($name, "WarnCount", "")-1; $i>=0; $i--){ @@ -1116,14 +1123,16 @@ sub UWZAsHtmlLite($;$) { } else { $ret .= '
'.$htmltitle.'
'; - $ret .= ''; + $ret .= '
'; $ret .= ''; $ret .= '
'.$htmltitle.'
'; + # language by AttrVal if ( $hash->{CountryCode} ~~ [ 'DE', 'AT', 'CH' ] ) { $ret .='Keine Warnungen'; } else { $ret .='No Warnings'; } + # end language by AttrVal $ret .= '
'; @@ -1140,9 +1149,11 @@ sub UWZAsHtmlFP($;$) { my ($name,$items) = @_; my $tablewidth = ReadingsVal($name, "WarnCount", "") * 80; my $htmlsequence = AttrVal($name, "htmlsequence", "none"); + my $htmltitle = AttrVal($name, "htmltitle", ""); + my $htmltitleclass = AttrVal($name, "htmltitleclass", ""); my $ret = ''; - $ret .= ''; + $ret .= '
'; $ret .= ""; if ($htmlsequence eq "descending") { @@ -1398,6 +1409,10 @@ sub UWZSearchAreaID($$) { =pod +=item device +=item summary Modul extracts thunderstorm warnings from unwetterzentrale.de +=item summary_DE Modul extrahiert Unwetterwarnungen von unwetterzentrale.de. + =begin html @@ -1586,6 +1601,16 @@ sub UWZSearchAreaID($$) { define warn order of html output (ascending|descending).
+
  • htmltitle +
    + title / header for the html ouput +
    +
  • +
  • htmltitleclass +
    + css-Class of title / header for the html ouput +
    +
  • localiconbase
    define baseurl to host your own thunderstorm warn pics (filetype is png). @@ -1963,6 +1988,16 @@ sub UWZSearchAreaID($$) { Anzeigereihenfolge der html warnungen. (ascending|descending).
  • +
  • htmltitle +
    + Titel / Ueberschrift der HTML Ausgabe +
    +
  • +
  • htmltitleclass +
    + css-Class des Titels der HTML Ausgabe +
    +
  • localiconbase
    BaseURL angeben um Warn Icons lokal zu hosten. (Dateityp ist png).
  • '.$htmltitle.'