Exemple #1
0
 public function addHistoryValue($_value, $_datetime = '')
 {
     if ($_value === null || $_value !== '' && $this->getIsHistorized() == 1 && $this->getType() == 'info' && $_value <= $this->getConfiguration('maxValue', $_value) && $_value >= $this->getConfiguration('minValue', $_value)) {
         $hitory = new history();
         $hitory->setCmd_id($this->getId());
         $hitory->setValue($_value);
         $hitory->setDatetime($_datetime);
         return $hitory->save($this);
     }
 }