@haydendonald/node-red-contrib-hass-stuff 1.1.2 → 1.1.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.
@@ -75,32 +75,32 @@
75
75
 
76
76
  <div class="form-row">
77
77
  <label style="font-weight: bold;" for="node-config-input-concentrateSettings">Concentrate Settings</label>
78
- <p>The scene to use for the concentrate scene [scene] [brightnessPercent]</p>
78
+ <p>The scene to use for the concentrate scene (during the day) [scene] [brightnessPercent]</p>
79
79
  <input type="text" id="node-config-input-concentrateSettings" />
80
80
  </div>
81
81
  <div class="form-row">
82
82
  <label style="font-weight: bold;" for="node-config-input-readSettings">Read Settings</label>
83
- <p>The scene to use for the read scene [scene] [brightnessPercent]</p>
83
+ <p>The scene to use for the read scene (8am-10am and 3-7pm) [scene] [brightnessPercent]</p>
84
84
  <input type="text" id="node-config-input-readSettings" />
85
85
  </div>
86
86
  <div class="form-row">
87
87
  <label style="font-weight: bold;" for="node-config-input-relaxSettings">Relax Settings</label>
88
- <p>The scene to use for the relax scene [scene] [brightnessPercent]</p>
88
+ <p>The scene to use for the relax scene (7am-8am and 7-8pm) [scene] [brightnessPercent]</p>
89
89
  <input type="text" id="node-config-input-relaxSettings" />
90
90
  </div>
91
91
  <div class="form-row">
92
92
  <label style="font-weight: bold;" for="node-config-input-restSettings">Rest Settings</label>
93
- <p>The scene to use for the rest scene [scene] [brightnessPercent]</p>
93
+ <p>The scene to use for the rest scene (6am - 7am) (8-11pm) [scene] [brightnessPercent]</p>
94
94
  <input type="text" id="node-config-input-restSettings" />
95
95
  </div>
96
96
  <div class="form-row">
97
97
  <label style="font-weight: bold;" for="node-config-input-nightLightSettings">Night Light Settings</label>
98
- <p>The scene to use for the night light scene [scene] [brightnessPercent]</p>
98
+ <p>The scene to use for the night light scene (11pm - 6am) [scene] [brightnessPercent]</p>
99
99
  <input type="text" id="node-config-input-nightLightSettings" />
100
100
  </div>
101
101
  <div class="form-row">
102
102
  <label style="font-weight: bold;" for="node-config-input-nightSettings">Night Settings</label>
103
- <p>The scene to use for the night light scene [scene] [brightnessPercent]</p>
103
+ <p>The scene to use for the night scene (when sleep mode is on) [scene] [brightnessPercent]</p>
104
104
  <input type="text" id="node-config-input-nightSettings" />
105
105
  </div>
106
106
  </script>
@@ -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.state;
112
+ currentState = data.data;
113
113
  entitiesOffDuringNight = config.entitiesOffAtNight.split(",");
114
114
  entitiesOnDuringNight = groupEntities.filter((entity) => !entitiesOffDuringNight.includes(entity));
115
115
  });
@@ -298,7 +298,10 @@ module.exports = function LightControlConfigNode(RED) {
298
298
  if (currentHour >= 23 || currentHour < 6) {
299
299
  scene = scenes["nightLight"];
300
300
  }
301
- else if (currentHour >= 6 && currentHour < 8) {
301
+ else if (currentHour >= 6 && currentHour < 7) {
302
+ scene = scenes["rest"];
303
+ }
304
+ else if (currentHour >= 7 && currentHour < 8) {
302
305
  scene = scenes["relax"];
303
306
  }
304
307
  else if (currentHour >= 8 && currentHour < 10) {
@@ -307,11 +310,14 @@ module.exports = function LightControlConfigNode(RED) {
307
310
  else if (currentHour >= 10 && currentHour < 15) {
308
311
  scene = scenes["concentrate"];
309
312
  }
310
- else if (currentHour >= 15 && currentHour < 20) {
313
+ else if (currentHour >= 15 && currentHour < 19) {
314
+ scene = scenes["read"];
315
+ }
316
+ else if (currentHour >= 19 && currentHour < 20) {
311
317
  scene = scenes["relax"];
312
318
  }
313
319
  else if (currentHour >= 20 && currentHour < 23) {
314
- scene = scenes["read"];
320
+ scene = scenes["rest"];
315
321
  }
316
322
  }
317
323
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haydendonald/node-red-contrib-hass-stuff",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
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",