From c7ff520789984ab883393e89e92ea91a497efd09 Mon Sep 17 00:00:00 2001 From: nasseeder1 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/fhem@23954 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/DS_Starter/76_SolarForecast.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/DS_Starter/76_SolarForecast.pm b/contrib/DS_Starter/76_SolarForecast.pm index 9d20b9e09..eda07fa4b 100644 --- a/contrib/DS_Starter/76_SolarForecast.pm +++ b/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);