From 4244cb3013e514c7446438223fd33563ef7ec9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6tz=20Gottwald?= Date: Mon, 19 Feb 2018 20:15:52 +0100 Subject: [PATCH] get brightness in percent --- src/Traits/Light.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/Light.php b/src/Traits/Light.php index f48ff07..8be9283 100644 --- a/src/Traits/Light.php +++ b/src/Traits/Light.php @@ -74,7 +74,7 @@ public function getBrightness(Device $device) */ public function setBrightness(Device $device, $value) { - $bright = dechex(round($value * 2.55)); + $bright = dechex($value); $rgb = $this->getRgb($device) ?? 'ffffff'; $this->miIO->send($device, 'set_rgb', [hexdec($bright . $rgb)]);