public async Task <Unit> Run(LightClient client) { string command = JsonConvert.SerializeObject(new { system = new { set_relay_state = new { state = isOn ? 1 : 0 } } }); await client.SendCommand(command); return(default);
public async Task <string> Run(LightClient client) { return(await client.SendCommand(command)); }