From f7757aa0cc99f0b90295d603628dcd7ab9c663f9 Mon Sep 17 00:00:00 2001 From: jhartworks Date: Thu, 22 Oct 2026 13:04:14 +0200 Subject: [PATCH] fixed led error --- DevoloAdapter/module.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'];