Skip to content

Commit

Permalink
Fix: Syntax #2610
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotfirenet committed May 27, 2024
1 parent bac551f commit acb2aa0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/class/history.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,10 @@ public function save($_cmd = null, $_direct = false) {
if ($cmd->getConfiguration('historizeRound') !== '' && is_numeric($cmd->getConfiguration('historizeRound')) && $cmd->getConfiguration('historizeRound') >= 0 && $this->getValue() !== null) {
$this->setValue(round($this->getValue(), $cmd->getConfiguration('historizeRound')));
}
if ($JEEDOM_INTERNAL_CONFIG['cmd']['type']['info']['subtype'][$cmd->getSubType()]['isHistorized']['canBeSmooth'] && $cmd->getConfiguration('smooth', 0) > 0 && $cmd->getConfiguration('historizeMode', 'none') =! 'none' && $this->getValue() !== null) {
if ( $JEEDOM_INTERNAL_CONFIG['cmd']['type']['info']['subtype'][$cmd->getSubType()]['isHistorized']['canBeSmooth']
&& $cmd->getConfiguration('smooth', 0) > 0
&& $cmd->getConfiguration('historizeMode', 'none') != 'none'
&& $this->getValue() !== null ) {
if ($this->getTableName() == 'history') {
$time = strtotime($this->getDatetime());
$time -= $time % $cmd->getConfiguration('smooth', 0);
Expand Down

0 comments on commit acb2aa0

Please sign in to comment.