From da70affe82aca15aa8ce928ab43297f934431ee7 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Mon, 11 Nov 2024 14:29:00 +0100 Subject: [PATCH] evt fehler behoben --- Belevo_Server_Kommunikation/module.php | 16 +++++++++++++--- library.json | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Belevo_Server_Kommunikation/module.php b/Belevo_Server_Kommunikation/module.php index 6f94b0e..f8041ef 100644 --- a/Belevo_Server_Kommunikation/module.php +++ b/Belevo_Server_Kommunikation/module.php @@ -148,9 +148,19 @@ class Belevo_Server_Kommunikation extends IPSModule $answer = $this->getWetter($anlagenummer, $this->ReadPropertyString("Gerätenummer"), $this->ReadPropertyString("Ortschaft")); - $this->SetValue("Temperatur", $answer['temp']); - $this->SetValue("Wolkenwarscheinlichkeit", $answer['cloud']); - + //$this->SetValue("Temperatur", $answer['temp']); + //$this->SetValue("Wolkenwarscheinlichkeit", $answer['cloud']); + if (isset($answer['temp'])) { + $this->SetValue("Temperatur", $answer['temp']); + } else { + IPS_LogMessage("Belevo_Server_Kommunikation", "Temperatur-Wert ist nicht vorhanden."); + } + + if (isset($answer['cloud'])) { + $this->SetValue("Wolkenwarscheinlichkeit", $answer['cloud']); + } else { + IPS_LogMessage("Belevo_Server_Kommunikation", "Wolkenwarscheinlichkeit-Wert ist nicht vorhanden."); + } if (!empty($json)) { // Kombiniere die URL mit der Anlagenummer diff --git a/library.json b/library.json index 11ea9dc..6a78236 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.119", + "version": "0.120", "build": 0, "date": 0 } \ No newline at end of file