public async void GetGarageDoor() { var devices = await api.GetDevices(); garageDoor = devices.Where(x => x.DeviceFamily == "garagedoor").FirstOrDefault(); GetDoorState(garageDoor); }
public async void GetDoorState(Device garageDoor) { doorState = await api.GetDoorState(garageDoor.SerialNumber); Xamarin.Forms.Device.BeginInvokeOnMainThread(() => { UpdateUi(doorState); }); }