From e729295cebaf8975f0376fa43c4bd92f6cd9a6a2 Mon Sep 17 00:00:00 2001 From: DS_Starter Date: Sat, 13 Mar 2021 18:59:54 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 0.10.0 git-svn-id: https://svn.fhem.de/fhem/trunk@23954 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 9d20b9e09..eda07fa4b 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -1236,9 +1236,11 @@ sub writeCacheToFile { my $name = $hash->{NAME}; my $type = $hash->{TYPE}; + return if(!$data{$type}{$name}{$cachename}); + my @pvh; - my $json = encode_json ($data{$type}{$name}{$cachename}); + my $json = encode_json $data{$type}{$name}{$cachename}; push @pvh, $json; my $error = FileWrite($file, @pvh);