Skip to content

Commit c675ec9

Browse files
committed
FIX: Adjusting heatingCurve by 1 now changes the heating time by 1 hour in forecast mode.
1 parent 740f6b8 commit c675ec9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SmartHeatingWidthShelly.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ let _ = {
100100
newSchedules: [],
101101
isSchedCreatedManually: false,
102102
existingSchedules: [],
103-
version: 3.5,
103+
version: 3.6,
104104
};
105105
let cntr = 0;
106106

@@ -187,8 +187,8 @@ let virtualComponents = [
187187
type: "number", id: 203, config: {
188188
name: "Forecast Impact +/-",
189189
default_value: 0,
190-
min: -10,
191-
max: 10,
190+
min: -6,
191+
max: 6,
192192
persisted: true,
193193
meta: { ui: { view: "slider", unit: "h more heat" } }
194194
}
@@ -617,7 +617,7 @@ function fcstCalc(res, err, msg) {
617617

618618
// calculating heating hours
619619
const startTemp = 16;
620-
let fcstHeatTime = ((startTemp - tempFcst) * (s.powerFactor - 1) + (startTemp - tempFcst + s.heatingCurve - 2));
620+
let fcstHeatTime = ((startTemp - tempFcst) * (s.powerFactor - 1) + (startTemp - tempFcst + s.heatingCurve * 2 - 2));
621621
fcstHeatTime = fcstHeatTime < 0 || tempFcst > startTemp ? 0 : fcstHeatTime; //heating time can't be negative
622622
_.heatTime = Math.floor(fcstHeatTime / _.ctPeriods); //divide with periods and round-down heating duration
623623
_.heatTime = _.heatTime > s.heatingMode.timePeriod ? s.heatingMode.timePeriod : _.heatTime; //heating time can't be more than period

0 commit comments

Comments
 (0)