mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
32_withings.pm: fix for warnings if not connected
git-svn-id: https://svn.fhem.de/fhem/trunk@6959 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8f9e512a33
commit
c439398186
@ -553,6 +553,9 @@ withings_pollUser($)
|
||||
$url .= "&userid=$hash->{User}&publickey=$hash->{Key}";
|
||||
$url .= "&lastupdate=$lastupdate" if( $lastupdate );
|
||||
my $ret = get($url);
|
||||
|
||||
return if( !$ret );
|
||||
|
||||
#my $json = JSON->new->utf8(0)->decode($ret);
|
||||
my $json = ();
|
||||
$json = JSON->new->utf8->decode(encode('UTF-8', $ret)) if( $ret =~ m/^{.*}$/ );
|
||||
|
Loading…
x
Reference in New Issue
Block a user