コード例 #1
0
        public async void GetGarageDoor()
        {
            var devices = await api.GetDevices();

            garageDoor = devices.Where(x => x.DeviceFamily == "garagedoor").FirstOrDefault();
            GetDoorState(garageDoor);
        }
コード例 #2
0
        public async void GetDoorState(Device garageDoor)
        {
            doorState = await api.GetDoorState(garageDoor.SerialNumber);

            Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
            {
                UpdateUi(doorState);
            });
        }