From e15a70ff0bb3c4cf9e3cacce6480b5d0ecd14e7d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 1 Nov 2023 21:04:39 +0100 Subject: [PATCH] test: fix initial variables --- CHANGELOG.md | 14 ++++++++++++-- FHEM/73_GardenaSmartBridge.pm | 33 +++++++++++++++++---------------- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dddca3..5459f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -### test: cleanup initial error handling (HEAD -> patch_mucki) +### test: debug line (HEAD -> patch_mucki) +>Sat, 28 Oct 2023 18:02:17 +0200 + +>Author: Sebastian (em@ail.tld) + +>Commiter: Sebastian (em@ail.tld) + + + + +### test: cleanup initial error handling (origin/patch_mucki) >Wed, 25 Oct 2023 22:16:26 +0200 >Author: Sebastian (em@ail.tld) @@ -8,7 +18,7 @@ -### test: fix wifi status if is_connected (origin/patch_mucki) +### test: fix wifi status if is_connected >Mon, 23 Oct 2023 22:04:31 +0200 >Author: Sebastian (em@ail.tld) diff --git a/FHEM/73_GardenaSmartBridge.pm b/FHEM/73_GardenaSmartBridge.pm index 035dda1..ed49fbf 100644 --- a/FHEM/73_GardenaSmartBridge.pm +++ b/FHEM/73_GardenaSmartBridge.pm @@ -632,27 +632,28 @@ sub ErrorHandling { # replace defined with exists # && defined( $decode_json->{errors} ) ) { - Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 2"; - Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 1/2".$decode_json->{errors}; - Log3 $name, 4, "[DEBUG] $name - ERROR HANDLING Bridge Parts 2/2".$decode_json->{errors}[0]; - readingsBulkUpdate( + # $decode_json->{errors} -> ARRAY + # $decode_json->{errors}[0] -> HASH + if (exists ($decode_json->{errors}[0]{error}) ) { + readingsBulkUpdate( $dhash, "state", $decode_json->{errors}[0]{error} . ' ' . $decode_json->{errors}[0]{attribute}, 1 - ); - readingsBulkUpdate( - $dhash, - "lastRequestState", - $decode_json->{errors}[0]{error} . ' ' - . $decode_json->{errors}[0]{attribute}, - 1 - ); - Log3 $dname, 5, - "GardenaSmartBridge ($dname) - RequestERROR: " - . $decode_json->{errors}[0]{error} . " " - . $decode_json->{errors}[0]{attribute}; + ); + readingsBulkUpdate( + $dhash, + "lastRequestState", + $decode_json->{errors}[0]{error} . ' ' + . $decode_json->{errors}[0]{attribute}, + 1 + ); + Log3 $dname, 5, + "GardenaSmartBridge ($dname) - RequestERROR: " + . $decode_json->{errors}[0]{error} . " " + . $decode_json->{errors}[0]{attribute}; + } # fi exists error } } else { diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index e4eff4d..daa2f5f 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ -UPD 2023-10-28_18:01:31 50373 FHEM/73_GardenaSmartBridge.pm +UPD 2023-11-01_20:57:32 50330 FHEM/73_GardenaSmartBridge.pm UPD 2023-10-03_22:40:44 126409 FHEM/74_GardenaSmartDevice.pm