@haydendonald/node-red-contrib-hass-stuff 1.1.1 → 1.1.3
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.
|
@@ -114,7 +114,6 @@ module.exports = function EVChargingPriceNode(RED) {
|
|
|
114
114
|
finishedChargingAt = undefined;
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
117
|
-
startedChargingAt = oldState.last_changed;
|
|
118
117
|
finishedChargingAt = newState.last_changed;
|
|
119
118
|
}
|
|
120
119
|
handle();
|
|
@@ -155,7 +154,7 @@ module.exports = function EVChargingPriceNode(RED) {
|
|
|
155
154
|
// Split charging period at hour boundaries for accurate rate calculation
|
|
156
155
|
let timeInPeakMs = 0;
|
|
157
156
|
let timeInOffPeakMs = 0;
|
|
158
|
-
let currentTime = new Date();
|
|
157
|
+
let currentTime = new Date(startDate);
|
|
159
158
|
while (currentTime < endDate) {
|
|
160
159
|
// Find the next hour boundary or end of charging period
|
|
161
160
|
const nextHourBoundary = new Date(currentTime);
|
|
@@ -109,7 +109,7 @@ module.exports = function LightControlConfigNode(RED) {
|
|
|
109
109
|
//Get what entities exist in the group and set our internal state
|
|
110
110
|
connectionsConfigNode.getHASSEntityState(config.groupEntityId, (payload, data) => {
|
|
111
111
|
groupEntities = data.data.attributes.entity_id;
|
|
112
|
-
currentState = data.data
|
|
112
|
+
currentState = data.data;
|
|
113
113
|
entitiesOffDuringNight = config.entitiesOffAtNight.split(",");
|
|
114
114
|
entitiesOnDuringNight = groupEntities.filter((entity) => !entitiesOffDuringNight.includes(entity));
|
|
115
115
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haydendonald/node-red-contrib-hass-stuff",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "A collection of stuff I use on my Node Red + Home Assistant server. This could be of use for others, i don't know..",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@types/node": "^18.14.0",
|