diff --git a/DevoloAdapter/module.php b/DevoloAdapter/module.php index 9802bec..77f8df1 100644 --- a/DevoloAdapter/module.php +++ b/DevoloAdapter/module.php @@ -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'];