Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
if (cool or heat) AND we are not in ALL mode AND we are not in the requested mode
  • Loading branch information
NebzHB authored Nov 23, 2023
1 parent 305cba7 commit ae7000a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/class/thermostat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static function hysteresis($_options) {
if ($status == __('Climatisation', __FILE__) && $temp < ($consigne - $thermostat->getConfiguration('hysteresis_threshold', 1))) {
$action = 'stop';
}
if(($action == 'cool' || $action == 'heat') && ($thermostat->getConfiguration('allow_mode', 'all') != 'all' || $thermostat->getConfiguration('allow_mode', 'all') != $action)){
if(($action == 'cool' || $action == 'heat') && $thermostat->getConfiguration('allow_mode', 'all') != 'all' && $thermostat->getConfiguration('allow_mode', 'all') != $action){
$action = 'none';
}

Expand Down

0 comments on commit ae7000a

Please sign in to comment.