From 5d6dd99b97481c22da1c71ff2b0226d49eed8c69 Mon Sep 17 00:00:00 2001 From: Yorick Rommers Date: Tue, 1 Dec 2015 12:44:25 +0100 Subject: [PATCH] color working --- HueUWP/APIHandler.cs | 2 +- HueUWP/Light.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HueUWP/APIHandler.cs b/HueUWP/APIHandler.cs index 9ece594..de1e021 100755 --- a/HueUWP/APIHandler.cs +++ b/HueUWP/APIHandler.cs @@ -44,7 +44,7 @@ namespace HueUWP { if(l.IsOn) { - var json = await nwh.SetLightInfo(l.ID, $"{{\"bri\": {l.Brightness},\"hue\": {l.Hue},\"sat\": {l.Saturation}}}"); + var json = await nwh.SetLightInfo(l.ID, $"{{\"bri\": {l.Brightness},\"hue\": {l.Hue*255},\"sat\": {l.Saturation}}}"); Debug.WriteLine(json); } diff --git a/HueUWP/Light.cs b/HueUWP/Light.cs index 1000795..eaf5a41 100644 --- a/HueUWP/Light.cs +++ b/HueUWP/Light.cs @@ -43,6 +43,7 @@ namespace HueUWP this.Hue = h; this.Saturation = s; this.Brightness = v; api.SetLightValues(this); Debug.WriteLine(r + "-" + g + "-" + b); + Debug.WriteLine(h + "-" + s + "-" + v); }