control: Associate identifier with target holds

Create a zone method that associates a unique identifier to a target
hold so that if more than one hold exists, the highest target is always
used between all actions that could have set a target hold on the zone.

Change-Id: I7699769a2e271c8a63a0a0a05aef6b0888ce180a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/actions/count_state_target.cpp b/control/json/actions/count_state_target.cpp
index 9f2ba5e..1017ae6 100644
--- a/control/json/actions/count_state_target.cpp
+++ b/control/json/actions/count_state_target.cpp
@@ -64,7 +64,6 @@
             }
             if (numAtState >= _count)
             {
-                zone.setTarget(_target);
                 break;
             }
         }
@@ -74,9 +73,9 @@
         }
     }
 
-    // Update zone's active fan control allowed based on action results
-    zone.setActiveAllow(ActionBase::getName() + std::to_string(_id),
-                        !(numAtState >= _count));
+    // Update zone's target hold based on action results
+    zone.setTargetHold(ActionBase::getName() + std::to_string(_id), _target,
+                       (numAtState >= _count));
 }
 
 void CountStateTarget::setCount(const json& jsonObj)