Beispiel #1
0
 public static void ExecuteScheduledJob(AutomaticJobContext automaticJobContext)
 {
     if (GetGlobalScheduleEnabled())
     {
         TimeSpan duration = automaticJobContext.ChannelProgramData.Duration
                             * GetGlobalOverride()
                             * GetWeatherMultiplicator(automaticJobContext.ChannelProgramData.ActivateWeatherInfo)
                             * GetHumidityMultiplicator(automaticJobContext.HumiditySensorEnabled, automaticJobContext.HumiditySensor);
         WaterRelaisControl.Activate(automaticJobContext.ChannelId, automaticJobContext.ChannelProgramData.EnableMasterChannel, "Automatic", duration);
         BackgroundJob.Schedule(() => WaterRelaisControl.Deactivate(automaticJobContext.ChannelId, "Automatic"), duration);
     }
 }
 public override void ActivateAction(TimeSpan duration) => WaterRelaisControl.Activate(ManualActionExecution.ChannelId, ManualActionExecution.ActivateMasterChannel, "Manual", duration);