public async void SetLightValues(Bulb l) { if (l.on) { //Debug.WriteLine(l.hue); var json = await network.SetLightInfo(l.id, $"{{\"bri\": {l.bri},\"hue\": {(l.hue)},\"sat\": {l.sat}}}"); //Debug.WriteLine(json); } }
private async void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { currentBulb = totalBulbs.ElementAt(listBox.SelectedIndex); Frame.Navigate(typeof(BulbPage), currentBulb); }
public async void SetLightState(Bulb l) { var json = await network.SetLightInfo(l.id, $"{{\"on\": {((l.on) ? "true" : "false")}}}"); //Debug.WriteLine(json); }