Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
🐛 scale light brightness 0-255
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlevay committed Oct 8, 2023
1 parent e4084fd commit 72c4bf2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/components/LightsController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export default function LightsController() {
const converted = hsvaToRgba(hsva);
const { r: red, g: green, b: blue } = converted;
const data = {
red,
green,
blue,
white_up: whiteUp,
white_down: whiteDown,
red: whiteDown === 0 ? red : 0,
green: whiteDown === 0 ? green : 0,
blue: whiteDown === 0 ? blue : 0,
white_up: whiteUp * 2.55,
white_down: whiteDown * 2.55,
authToken: session?.accessToken,
};
const response = await fetch('/api/lights', {
Expand Down

0 comments on commit 72c4bf2

Please sign in to comment.