Skip to content

Commit

Permalink
Bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanV2 committed Apr 10, 2023
1 parent 6c7f56a commit ea92346
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/colors/gamut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/hue/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class Application {
body: JSON.stringify(state),
};

return this.bridge.rest.get<ClipV2Message<StateChangeSuccess>>(
return this.bridge.rest.put<ClipV2Message<StateChangeSuccess>>(
`/clip/v2/resource/grouped_light/${groupId}`,
options
);
Expand Down Expand Up @@ -161,7 +161,7 @@ export class Application {
body: JSON.stringify(state),
};

return this.bridge.rest.get<ClipV2Message<Reference>>(`/clip/v2/resource/light/${lightId}`, options);
return this.bridge.rest.put<ClipV2Message<Reference>>(`/clip/v2/resource/light/${lightId}`, options);
}

/** Gets the `motion` resource from the bridge.
Expand Down

0 comments on commit ea92346

Please sign in to comment.