public ConditionalOnAutomation RegisterConditionalOnAutomation(IArea area, Enum id) { if (area == null) throw new ArgumentNullException(nameof(area)); var automation = new ConditionalOnAutomation( AutomationIdGenerator.Generate(area, id), _schedulerService, _dateTimeService, _daylightService); area.AddAutomation(automation); return automation; }
public static TurnOnAndOffAutomation SetupTurnOnAndOffAutomation(this IArea area) { if (area == null) { throw new ArgumentNullException(nameof(area)); } var automation = new TurnOnAndOffAutomation( AutomationIdFactory.CreateIdFrom <TurnOnAndOffAutomation>(area), area.Controller.Timer); area.AddAutomation(automation); return(automation); }
public static TurnOnAndOffAutomation SetupTurnOnAndOffAutomation(this IArea area) { if (area == null) { throw new ArgumentNullException(nameof(area)); } var automation = new TurnOnAndOffAutomation( AutomationIdFactory.CreateIdFrom <TurnOnAndOffAutomation>(area), area.Controller.ServiceLocator.GetService <IDateTimeService>(), area.Controller.ServiceLocator.GetService <ISchedulerService>()); area.AddAutomation(automation); return(automation); }
public ConditionalOnAutomation RegisterConditionalOnAutomation(IArea area, Enum id) { if (area == null) { throw new ArgumentNullException(nameof(area)); } var automation = new ConditionalOnAutomation( AutomationIdGenerator.Generate(area, id), _schedulerService, _dateTimeService, _daylightService); area.AddAutomation(automation); return(automation); }
public static ConditionalOnAutomation SetupConditionalOnAutomation(this IArea area) { if (area == null) { throw new ArgumentNullException(nameof(area)); } var automation = new ConditionalOnAutomation( AutomationIdFactory.CreateIdFrom <ConditionalOnAutomation>(area), area.Controller.Timer, area.Controller.HttpApiController, area.Controller.Logger); area.AddAutomation(automation); return(automation); }
public static RollerShutterAutomation SetupRollerShutterAutomation(this IArea area) { if (area == null) { throw new ArgumentNullException(nameof(area)); } var automation = new RollerShutterAutomation( AutomationIdFactory.CreateIdFrom <RollerShutterAutomation>(area), area.Controller.Timer, area.Controller.GetService <IDaylightService>(), area.Controller.GetService <IWeatherService>(), area.Controller); automation.Activate(); area.AddAutomation(automation); return(automation); }
public RollerShutterAutomation RegisterRollerShutterAutomation(IArea area, Enum id) { if (area == null) { throw new ArgumentNullException(nameof(area)); } var automation = new RollerShutterAutomation( AutomationIdGenerator.Generate(area, id), _notificationService, _schedulerService, _dateTimeService, _daylightService, _outdoorTemperatureService, _componentService, _settingsService, _resourceService); area.AddAutomation(automation); return(automation); }
public RollerShutterAutomation RegisterRollerShutterAutomation(IArea area, Enum id) { if (area == null) throw new ArgumentNullException(nameof(area)); var automation = new RollerShutterAutomation( AutomationIdGenerator.Generate(area, id), _notificationService, _schedulerService, _dateTimeService, _daylightService, _outdoorTemperatureService, _componentService, _settingsService, _resourceService); area.AddAutomation(automation); return automation; }