fix little bugs

This commit is contained in:
Marko Oldenburg 2021-03-27 00:00:50 +01:00
parent 472b37271d
commit 67bc1ac70b
2 changed files with 7 additions and 6 deletions

View File

@ -357,7 +357,7 @@ sub Notify {
$devtype eq 'GardenaSmartBridge'
&& (
grep /^gardenaAccountPassword.+/,
@{$events} || ReadingsVal( '$devname', 'token', '' ) eq 'none'
@{$events}
)
)
);
@ -490,7 +490,8 @@ sub ErrorHandling {
my $dname = $dhash->{NAME};
# Log3 $name, 4, Dumper($data);
Log3 $name, 2, "GardenaSmartBridge ($name) - Request: $data";
my $decode_json = eval { decode_json($data) };
if ($@) {
Log3 $name, 3, "GardenaSmartBridge ($name) - JSON error while request";
@ -719,7 +720,7 @@ sub ResponseProcessing {
$hash->{helper}{session_id} = $decode_json->{data}{id};
$hash->{helper}{user_id} = $decode_json->{data}{attributes}->{user_id};
$hash->{helper}{refresh_tokebn} = $decode_json->{data}{attributes}->{refresh_token};
$hash->{helper}{refresh_token} = $decode_json->{data}{attributes}->{refresh_token};
Write( $hash, undef, undef, undef );
Log3 $name, 3, "GardenaSmartBridge ($name) - fetch locations id";

View File

@ -1 +1 @@
UPD 2021-03-26_22:20:12 43636 FHEM/73_GardenaSmartBridge.pm
UPD 2021-03-26_23:46:02 43623 FHEM/73_GardenaSmartBridge.pm