Skip to content

Commit

Permalink
Add jeedom.history.getLast
Browse files Browse the repository at this point in the history
  • Loading branch information
tysauron committed Oct 4, 2023
1 parent ce714b5 commit f9603f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/class/history.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ public static function lastFromDate($_cmd_id, $_time){

$return = DB::Prepare($sql, $values, DB::FETCH_TYPE_ALL, PDO::FETCH_CLASS, __CLASS__);
if(isset($return[0]))
return $return[0]->getValue();
return array('unite' => $cmd->getUnite(), 'value' => $return[0]->getValue());
}
elseif(is_object($cmd)){
return array('unite' => $cmd->getUnite(), 'value' =>history::getLastHistoryFromCalcul (jeedom::fromHumanReadable($cmd->getConfiguration('calcul')), $_time));
Expand Down

0 comments on commit f9603f5

Please sign in to comment.