mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 06:36:04 +00:00
59_LuftdatenInfo: added error handling for malformed JSON string
git-svn-id: https://svn.fhem.de/fhem/trunk@14211 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
95e8914681
commit
a1abcb536d
@ -244,6 +244,13 @@ sub LuftdatenInfo_ParseHttpResponse($) {
|
||||
|
||||
readingsSingleUpdate($hash, "state", "error", 1);
|
||||
}
|
||||
elsif($data !~ /^\[.*\]$/s){
|
||||
Log3(
|
||||
$SELF, 2, "$TYPE ($SELF) - error while request: malformed JSON string"
|
||||
);
|
||||
|
||||
readingsSingleUpdate($hash, "state", "error", 1);
|
||||
}
|
||||
elsif($data eq "[]"){
|
||||
if( index($param->{url}, $hash->{SENSORID2}) > -1
|
||||
&& InternalVal($SELF, "SENSORIDS", "implicit") eq "implicit"
|
||||
|
Loading…
x
Reference in New Issue
Block a user