fixed led error
This commit is contained in:
1 parent
403a19ac85
commit
f7757aa0cc
1 file changed
+3
-1
@@ -491,7 +491,9 @@ class DevoloMagic extends IPSModule
|
||||
if ($response['status'] === 401 || $response['status'] === 403) {
|
||||
throw new RuntimeException('Gerätepasswort wurde abgelehnt.', self::STATUS_AUTHENTICATION);
|
||||
}
|
||||
if ($response['status'] < 200 || $response['status'] >= 300 || $response['body'] === '') {
|
||||
// Proto3 serializes a message containing only default values as zero bytes.
|
||||
// For example LedSettingsGet with LED_ON (= 0) legitimately has an empty body.
|
||||
if ($response['status'] < 200 || $response['status'] >= 300) {
|
||||
throw new RuntimeException('Magic-API antwortet für ' . $endpoint . ' mit HTTP ' . $response['status'] . '.', self::STATUS_COMMUNICATION);
|
||||
}
|
||||
return $response['body'];
|
||||
|
||||
Reference in new issue
Block a user