public async Task <bool> HandleRequest(Device device, SetDeviceStateRequest request) { try { var nodeId = int.Parse(device.Id.Replace("node-", "")); var nodeDevice = await NodeDatabase.Shared.GetDevice(nodeId); var command = await nodeDevice.GetPerferedCommand(); var s = await nodeApi.SetState(command, request.On); return(s); } catch (Exception ex) { Console.WriteLine(ex); } return(false); }
public Task <bool> HandleRequest(Rosie.Device device, SetDeviceStateRequest request) { throw new NotImplementedException(); }