@haydendonald/node-red-contrib-hass-stuff 1.1.6 → 1.1.7
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.
|
@@ -134,7 +134,7 @@ module.exports = function LightControlConfigNode(RED) {
|
|
|
134
134
|
friendlyName: `${self.name} - ${sceneValue.friendlyName}`,
|
|
135
135
|
id: (0, utility_1.getEntityId)("scene", `${self.name}_${sceneKey}`),
|
|
136
136
|
creationCallback: (response) => { },
|
|
137
|
-
activatedCallback: (serviceData) => {
|
|
137
|
+
activatedCallback: (state, serviceData) => {
|
|
138
138
|
//Set our scene
|
|
139
139
|
connectionsConfigNode.sendHASSAction("select.select_option", { entity_id: [(0, utility_1.getEntityId)("select", `${self.name}_current_scene`)] }, {
|
|
140
140
|
option: sceneValue.friendlyName
|
|
@@ -148,7 +148,7 @@ module.exports = function LightControlConfigNode(RED) {
|
|
|
148
148
|
friendlyName: `${self.name} - Adaptive`,
|
|
149
149
|
id: (0, utility_1.getEntityId)("scene", `${self.name}_adaptive`),
|
|
150
150
|
creationCallback: (response) => { },
|
|
151
|
-
activatedCallback: (serviceData) => {
|
|
151
|
+
activatedCallback: (state, serviceData) => {
|
|
152
152
|
//Set our scene to adaptive
|
|
153
153
|
connectionsConfigNode.sendHASSAction("select.select_option", { entity_id: [(0, utility_1.getEntityId)("select", `${self.name}_current_scene`)] }, {
|
|
154
154
|
option: "Adaptive"
|
|
@@ -161,7 +161,7 @@ module.exports = function LightControlConfigNode(RED) {
|
|
|
161
161
|
friendlyName: `${self.name} - Turn On`,
|
|
162
162
|
id: (0, utility_1.getEntityId)("scene", `${self.name}_turn_on`),
|
|
163
163
|
creationCallback: (response) => { },
|
|
164
|
-
activatedCallback: (serviceData) => {
|
|
164
|
+
activatedCallback: (state, serviceData) => {
|
|
165
165
|
runLights(serviceData.transition || 1, true);
|
|
166
166
|
}
|
|
167
167
|
});
|
|
@@ -170,7 +170,7 @@ module.exports = function LightControlConfigNode(RED) {
|
|
|
170
170
|
friendlyName: `${self.name} - Turn Off`,
|
|
171
171
|
id: (0, utility_1.getEntityId)("scene", `${self.name}_turn_off`),
|
|
172
172
|
creationCallback: (response) => { },
|
|
173
|
-
activatedCallback: (serviceData) => {
|
|
173
|
+
activatedCallback: (state, serviceData) => {
|
|
174
174
|
connectionsConfigNode.sendHASSAction("light.turn_off", { entity_id: [config.groupEntityId] }, {
|
|
175
175
|
transition: serviceData.transition || 1
|
|
176
176
|
});
|
|
@@ -181,7 +181,7 @@ module.exports = function LightControlConfigNode(RED) {
|
|
|
181
181
|
friendlyName: `${self.name} - Toggle`,
|
|
182
182
|
id: (0, utility_1.getEntityId)("scene", `${self.name}_toggle`),
|
|
183
183
|
creationCallback: (response) => { },
|
|
184
|
-
activatedCallback: (serviceData) => {
|
|
184
|
+
activatedCallback: (state, serviceData) => {
|
|
185
185
|
if (currentState.state == "off") {
|
|
186
186
|
runLights(serviceData.transition || 1, true);
|
|
187
187
|
}
|
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.7",
|
|
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",
|