node-red-contrib-eskomsepush 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,7 @@ Internally the node checks every minute if a schedule is currently active or not
14
14
 
15
15
  ![EskomsePush Victron MinSOC](img/eskomsepush-victron-minsoc.png)
16
16
 
17
- The node has been made to work well together with the [@victronenergy/node-red-contrib-victron](https://flows.nodered.org/node/@victronenergy/node-red-contrib-victron) nodes. One of the main once being the
17
+ The node has been made to work well together with the [@victronenergy/node-red-contrib-victron](https://flows.nodered.org/node/@victronenergy/node-red-contrib-victron) nodes. One of the main ones being the
18
18
  ESS control node for setting the MinSoc, based on the currently active stage. You can find the
19
19
  example flow for this via importing the [victron-minsoc-stage-based.json](examples/victron-minsoc-stage-based.json) example.
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-eskomsepush",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Node-RED interface for the Eskomsepush API",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -106,7 +106,7 @@ module.exports = function (RED) {
106
106
  end: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[1])
107
107
  }
108
108
  }
109
- if (Object.keys(LoadShedding.schedule.next).length === 0 && nowtime < schedule.split('-')[0]) {
109
+ if (nowtime < schedule.split('-')[0]) {
110
110
  LoadShedding.schedule.next = {
111
111
  start: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[0]),
112
112
  end: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[1])
@@ -116,8 +116,8 @@ module.exports = function (RED) {
116
116
  if (Object.keys(LoadShedding.schedule.next).length === 0) {
117
117
  const s = Schedule.schedule.days[1].stages[stage - 1][0]
118
118
  LoadShedding.schedule.next = {
119
- start: Date.parse(Schedule.sschedule.days[1].date + s.split('-')[0]),
120
- end: Date.parse(Schedule.sschedule.days[1].date + s.split('-')[1])
119
+ start: Date.parse(Schedule.schedule.days[1].date + s.split('-')[0]),
120
+ end: Date.parse(Schedule.schedule.days[1].date + s.split('-')[1])
121
121
  }
122
122
  }
123
123
  LoadShedding.event.next = {