color fix
This commit is contained in:
@@ -44,7 +44,7 @@ namespace HueUWP
|
||||
{
|
||||
if(l.IsOn)
|
||||
{
|
||||
var json = await nwh.SetLightInfo(l.ID, $"{{\"bri\": {l.Brightness},\"hue\": {l.Hue*255},\"sat\": {l.Saturation}}}");
|
||||
var json = await nwh.SetLightInfo(l.ID, $"{{\"bri\": {l.Brightness-1},\"hue\": {(l.Hue/360)*65535},\"sat\": {l.Saturation*254}}}");
|
||||
Debug.WriteLine(json);
|
||||
}
|
||||
|
||||
@@ -55,9 +55,7 @@ namespace HueUWP
|
||||
List<Light> lightlist = new List<Light>();
|
||||
try {
|
||||
var json = await nwh.AllLights();
|
||||
Debug.WriteLine(json);
|
||||
JObject o = JObject.Parse(json);
|
||||
Debug.WriteLine(o.ToString());
|
||||
|
||||
for (int i = 1; i <= o.Count; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user