anchor.diff:  %% --------------------------------------------------------------------
   -export([create_thing/2]).
   
  -create_thing(Name, [{actor, Value}, {driver, {Driver, Function}, Module_Config}]) ->
  -    Config = get_config(),
  -    Config_1 = case is_entry(Name, Config) of 
  -        true -> lager:info("Entry with name : ~p already exists!", [Name]);
  -        false -> create_entries(Name, [{actor, Value}, {driver, {Driver, Function}, Module_Config}])
  +create_thing(Name, Config) ->
  +    Existing_config = get_config(),
  +    Thing_config = case is_entry(Name,  Existing_config) of 
  +        true -> lager:error("Entry with name : ~p already exists!", [config:get_value(thing, Existing_config)]),
  +                [];
  +        false -> create_entries(Name, Config)
       end,
  -    {thing, Name, Config_1}.
  -
  -
  -create_entries(Name, [{actor, Value}, {driver, {Driver, Function}, Module_Config}]) ->
  -    [create_entry(Entry, []) || Entry <- [id, icon, ets, activ, timer, database]].
  +    {thing, Name, Thing_config}.
       
  -
  +create_entries(Name, Config) ->
  +    [create_entry(Key, config:get_value(Key, Config)) || Key <- [type, ets, icon, id,driver, activ, timer, database, description]].
  +    
   get_config() ->
       {Node, Config} = node_config:get_things_config(),
       Config.
  +
   %% --------------------------------------------------------------------
   %%% Internal functions
   %% --------------------------------------------------------------------
   is_entry(Name, Config) ->
       lists:keymember(Name, 2, Config).     
   
  -create_entry(actor, true) ->
  -    {actor, true};
  -create_entry(actor, false) ->
  -    {actor, false};    
  -create_entry(actor, Value) ->
  -    {actor, false};
  +create_entry(type, sensor) ->
  +    {type, sensor};    
  +
  +create_entry(type, actor) ->
  +    {type, actor};
  +create_entry(type, sensor) ->
  +    {type, sensor};    
       
  -create_entry(id, []) ->
  +create_entry(id, undefined) ->
       create_entry(id, "default");
   create_entry(id, Value) ->
       {id, Value};
  
positive.code: -include_lib("eunit/include/eunit.hrl").
  -ifdef(TEST).
  create_description_test() ->
      ?assertEqual({description, "Please, add the description here"}, create_entry(description, [])).
  
  create_thing_test() ->
      node_config:start(),
      create_thing("test", [{actor, sensor}, {driver, {test_driver, call_sensor},[]}]).
  -endif.
      
negative.code: create_entry(timer, Value) when is_integer(Value) ->
      {timer, Value};
  
  create_entry(database, undefined) ->
      {database, []};
  create_entry(database, Value) ->
      {database, Value};
  
  create_entry(description, undefined) ->
      {description, "Please, add the description here"};   
  create_entry(description, Value) ->
      {description, Value}.    
  