public ToggleAutomationRule(string id, IToggleDevice toggleDevice, IToggleAutomationCondition condition) { Id = id; ToggleDevice = toggleDevice; Condition = condition; State = Condition.State; Condition.OnStateChanged += Condition_OnStateChanged; }
public ToggleDeviceViewModel(IToggleDevice device) : base(device) { automated = device.Automated; powerConsumption = device.PowerConsumption; timer = device.Timer == null ? null : DeviceTimerViewModel.FromToggleTimer(device.Timer); }