public async void return_true_on_stop_all_light() { var lightsManager = new LightsManager(_client); await lightsManager.RetrieveLights(); var result = await lightsManager.StopAllLights(); Check.That(result).IsEqualTo(StateLight.Off); }
private async void OffLights(object sender, ElapsedEventArgs e) { var nowTime = DateTime.Now.TimeOfDay; foreach (var hourOff in _hoursOff) { if (hourOff.Hour.Hours == nowTime.Hours && hourOff.Hour.Minutes == nowTime.Minutes) { await _lightsManager.RetrieveLights(); await _lightsManager.StopAllLights(); _timerToHoursOff.Stop(); } } }