Skip to content

Commit

Permalink
also update .xy values via push api
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Jun 11, 2023
1 parent 2f9c50f commit 38033a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/main.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/hueHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,6 @@ export function XYBtoRGB(x: number, y: number, Brightness?: number): { Red: numb
*
* @param mired mired value
*/
export function miredToKelvin(mired: number) {
export function miredToKelvin(mired: number): number {
return Math.round(1e6 / mired);
}
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,8 @@ class Hue extends utils.Adapter {
}

if (update.color) {
// TODO
this.setState(`${channelName}.xy`, `${update.color.xy.x},${update.color.xy.y}`, true);
// TODO: also update rgb values (and maybe hue sat)
}
}

Expand Down

0 comments on commit 38033a5

Please sign in to comment.