Skip to content

Commit

Permalink
get brightness in percent
Browse files Browse the repository at this point in the history
  • Loading branch information
ggottwald committed Feb 19, 2018
1 parent dd8c288 commit 4244cb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/Light.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)]);
Expand Down

0 comments on commit 4244cb3

Please sign in to comment.