anchor.diff:          error_result(Config, input, Reason, DefaultValue)
     end,
   
  -  {ok, Private1} = set_state(Private, LedId, LedValue, InvertOutput),
  -  {ok, Private2} = set_trigger(Private1, LedId, Trigger),
  +  set_led_state(LedId, LedValue, InvertOutput, Trigger, DelayOn, DelayOff),
  +
  +  % {ok, Private1} = set_state(Private, LedId, LedValue, InvertOutput),
  +  % {ok, Private2} = set_trigger(Private1, LedId, Trigger),
       
  -  % Only set delay_on and delay_off, if trigger is "timer"
  -  if (Trigger == "timer") ->
  -    {ok, Private3} = set_delay_on(Private2, LedId, DelayOn),
  -    {ok, Private4} = set_delay_off(Private3, LedId, DelayOff);
  +  % % Only set delay_on and delay_off, if trigger is "timer"
  +  % if (Trigger == "timer") ->
  +  %   {ok, Private3} = set_delay_on(Private2, LedId, DelayOn),
  +  %   {ok, Private4} = set_delay_off(Private3, LedId, DelayOff);
         
  -  true ->
  -    Private4 = Private2
  -  end,
  +  % true ->
  +  %   Private4 = Private2
  +  % end,
   
     Outputs1 = output_utils:set_value_status(Outputs, Value, Status),
   
  -  {Config, Inputs, Outputs1, Private4}.
  +  {Config, Inputs, Outputs1, Private}.
   
   
   %% 
  
positive.code:   {LedValue, Trigger, DelayOn, DelayOff, Value, Status}.
  
  
  % Set the actual value of the LED file here
  set_state(Private, LedId, Value, Invert) ->
    
    if Value -> % Value is true/on
      if Invert -> % Invert pin value 
        State = "0"; % turn output off
  
negative.code: -spec initialize(BlockState :: block_state()) -> block_state().
  
  initialize({Config, Inputs, Outputs, Private}) ->
    % Private1 = attrib_utils:merge_attribute_lists(Private, 
    %   [
    %     {last_state, {empty}},
    %     {last_trigger, {empty}},
    %     {last_delay_on, {empty}},
    %     {last_delay_off, {empty}}
    %   ]),
  
    case config_utils:get_string(Config, led_id) of
      {ok, LedId} ->
  