diff --git a/src/colors/gamut.ts b/src/colors/gamut.ts index 50047b5..a501458 100644 --- a/src/colors/gamut.ts +++ b/src/colors/gamut.ts @@ -81,7 +81,7 @@ export namespace Gamut { export function toRGB(x: number, y: number, brightness: number): RGB { // Apply gamma correction - const Y = brightness; + const Y = brightness / 100; const X = (Y / y) * x; const Z = (Y / y) * (1 - x - y); diff --git a/src/hue/application.ts b/src/hue/application.ts index c01f0d5..209e494 100644 --- a/src/hue/application.ts +++ b/src/hue/application.ts @@ -91,7 +91,7 @@ export class Application { body: JSON.stringify(state), }; - return this.bridge.rest.get>( + return this.bridge.rest.put>( `/clip/v2/resource/grouped_light/${groupId}`, options ); @@ -161,7 +161,7 @@ export class Application { body: JSON.stringify(state), }; - return this.bridge.rest.get>(`/clip/v2/resource/light/${lightId}`, options); + return this.bridge.rest.put>(`/clip/v2/resource/light/${lightId}`, options); } /** Gets the `motion` resource from the bridge.