Skip to content

Commit 5c79f9d

Browse files
authored
Merge pull request #1043 from trevorkwhite/master
Load Screenlogic Recurring Schedules / Version Correctly
2 parents cf5f847 + 52942cd commit 5c79f9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

controller/comms/ScreenLogic.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class ScreenLogicComms {
8787
logger.screenlogic(msg);
8888
})
8989
let ver = await this._client.getVersionAsync();
90-
logger.info(`Screenlogic: connect to ${systemName} ${ver} at ${unit.ipAddr}:${unit.port}`);
90+
logger.info(`Screenlogic: connect to ${systemName} ${ver.version} at ${unit.ipAddr}:${unit.port}`);
9191

9292
let addClient = await this._client.addClientAsync();
9393
logger.silly(`Screenlogic:Add client result: ${addClient}`);
@@ -1111,12 +1111,12 @@ class Controller {
11111111
Run once schedules: [{"scheduleId":12,"circuitId":6,"startTime":"0800","stopTime":"1100","dayMask":1,"flags":1,"heatCmd":4,"heatSetPoint":70,"days":["Mon"]},{"scheduleId":13,"circuitId":6,"startTime":"0800","stopTime":"1100","dayMask":1,"flags":1,"heatCmd":4,"heatSetPoint":70,"days":["Mon"]}] */
11121112

11131113
for (let i = 0; i < slrecurring.data.length; i++) {
1114-
let slsched = slrecurring[i];
1114+
let slsched = slrecurring.data[i];
11151115
let data = {
11161116
id: slsched.scheduleId,
11171117
circuit: slsched.circuitId,
1118-
startTime: Math.floor(slsched.startTime / 100) * 60 + slsched.startTime % 100,
1119-
endTime: Math.floor(slsched.stopTime / 100) * 60 + slsched.stopTime % 100,
1118+
startTime: Math.floor(parseInt(slsched.startTime) / 100) * 60 + parseInt(slsched.startTime) % 100,
1119+
endTime: Math.floor(parseInt(slsched.stopTime) / 100) * 60 + parseInt(slsched.stopTime) % 100,
11201120
scheduleDays: slsched.dayMask,
11211121
changeHeatSetPoint: slsched.heatCmd > 0,
11221122
heatSetPoint: slsched.heatSetPoint,

0 commit comments

Comments
 (0)