protected override void Execture_HomeAutomationSingleDeviceDefinition(HomeAutomationSingleDeviceContext context)
        {
            var target          = context.ReadParameter("Target").ToHumidity();
            var originalCommand = context.OriginalCommand;
            var commands        = originalCommand.InnerCommands;
            var device          = context.Device;
            var network         = device.Network;
            var triggers        = network.Context.Triggers;
            var history         = network.Context.History;
            var threadPool      = network.Context.ThreadPool;

            var trigger = new WhenHumidityRisesAboveValueTrigger(device, target, history.DeviceEvents);
            var action  = new RunScriptTriggerAction(threadPool, commands);

            var triggerBundle = new TriggerBundle(trigger, action);

            triggers.Add(triggerBundle);
        }
        protected override void Execture_HomeAutomationSingleDeviceDefinition(HomeAutomationSingleDeviceContext context)
        {
            var target = context.ReadParameter("Target").ToHumidity();
            var originalCommand = context.OriginalCommand;
            var commands = originalCommand.InnerCommands;
            var device = context.Device;
            var network = device.Network;
            var triggers = network.Context.Triggers;
            var history = network.Context.History;
            var threadPool = network.Context.ThreadPool;

            var trigger = new WhenHumidityRisesAboveValueTrigger(device, target, history.DeviceEvents);
            var action = new RunScriptTriggerAction(threadPool, commands);

            var triggerBundle = new TriggerBundle(trigger, action);

            triggers.Add(triggerBundle);
        }