public ToggleAutomationRule(string id, IToggleDevice toggleDevice, IToggleAutomationCondition condition)
        {
            Id           = id;
            ToggleDevice = toggleDevice;
            Condition    = condition;
            State        = Condition.State;

            Condition.OnStateChanged += Condition_OnStateChanged;
        }
Exemple #2
0
 public ToggleDeviceViewModel(IToggleDevice device) : base(device)
 {
     automated        = device.Automated;
     powerConsumption = device.PowerConsumption;
     timer            = device.Timer == null ? null : DeviceTimerViewModel.FromToggleTimer(device.Timer);
 }