From 121e21c5103cf463a5ac23b179cf52e8a7e43e4f Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 31 May 2021 20:59:35 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 0.49.3 git-svn-id: https://svn.fhem.de/fhem/trunk@24551 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 37 +++++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 2fb2d22e8..05d845caf 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -288,6 +288,16 @@ my %htitles = ( DE => qq{Ein (Automatikmodus) -> Automatik sperren} }, ieva => { EN => qq{On (automatic mode off) -> Switch off consumer}, DE => qq{Ein (Automatikmodus aus) -> Verbraucher ausschalten} }, + upd => { EN => qq{Update}, + DE => qq{Update} }, + on => { EN => qq{switched on}, + DE => qq{eingeschaltet} }, + off => { EN => qq{switched off}, + DE => qq{ausgeschaltet} }, + undef => { EN => qq{undefined}, + DE => qq{undefiniert} }, + dela => { EN => qq{delayed}, + DE => qq{verzoegert} }, ); my %weather_ids = ( @@ -4281,44 +4291,49 @@ sub _forecastGraphicHeader { ## Update-Icon ############## - my $upicon; + my ($upicon,$img); if ($upstate =~ /updated|successfully|switched/ix) { - $upicon = ""; + $img = FW_makeImage('10px-kreis-gruen.png', $htitles{upd}{$lang}); + $upicon = "$img"; } elsif ($upstate =~ /running/ix) { - $upicon = ""; + $img = FW_makeImage('10px-kreis-gelb.png', 'running'); + $upicon = "$img"; } elsif ($upstate =~ /initialized/ix) { - $upicon = ""; + $img = FW_makeImage('1px-spacer.png', 'initialized'); + $upicon = "$img"; } else { - $upicon = ""; + $img = FW_makeImage('10px-kreis-rot.png', $htitles{upd}{$lang}); + $upicon = "$img"; } ## Autokorrektur-Icon ###################### my $acicon; if ($pcfa eq "on") { - $acicon = ""; + $acicon = FW_makeImage('10px-kreis-gruen.png', $htitles{on}{$lang}); } elsif ($pcfa eq "off") { $acicon = "off"; } elsif ($pcfa =~ /standby/ix) { my ($rtime) = $pcfa =~ /for (.*?) hours/x; - $acicon = " (Start in ".$rtime." h)"; + $img = FW_makeImage('10px-kreis-gelb.png', $htitles{dela}{$lang}); + $acicon = "$img (Start in ".$rtime." h)"; } else { - $acicon = ""; + $acicon = FW_makeImage('10px-kreis-rot.png', $htitles{undef}{$lang}); } ## Qualitäts-Icon ###################### my $pcqicon; - $pcqicon = $pcq < 3 ? "" : - $pcq < 5 ? "" : - ""; + $pcqicon = $pcq < 3 ? FW_makeImage('10px-kreis-rot.png') : + $pcq < 5 ? FW_makeImage('10px-kreis-gelb.png') : + FW_makeImage('10px-kreis-gruen.png'); $pcqicon = "-" if(!$pvfc00 || $pcq == -1);