Esempio n. 1
0
        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);
Esempio n. 2
0
 public async Task <string> Run(LightClient client)
 {
     return(await client.SendCommand(command));
 }