node-red-contrib-deconz
Advanced tools
Comparing version 0.11.0 to 0.11.1
@@ -72,3 +72,3 @@ module.exports = function(RED) { | ||
node.send({ | ||
payload:(config.state in node.meta.state)?node.meta.state[config.state]:node.meta.state, | ||
payload:(config.state in node.meta.state)?(node.meta.state[config.state]).toString():node.meta.state, | ||
meta:deviceMeta, | ||
@@ -75,0 +75,0 @@ }); |
@@ -86,3 +86,3 @@ module.exports = function(RED) { | ||
shape: "dot", | ||
text: (node.config.state in device.state) ? device.state[node.config.state] : "connected" | ||
text: (node.config.state in device.state) ? (device.state[node.config.state]).toString() : "connected" | ||
}); | ||
@@ -89,0 +89,0 @@ } |
@@ -91,3 +91,3 @@ var request = require('request'); | ||
case 'colorloopspeed': | ||
case 'transitiontime': | ||
// case 'transitiontime': | ||
payload = parseInt(payload); | ||
@@ -139,2 +139,5 @@ break; | ||
} | ||
if (parseInt(config.transitionTime) >= 0) { | ||
post['transitiontime'] = parseInt(config.transitionTime); | ||
} | ||
@@ -222,3 +225,3 @@ node.postData(url, post); | ||
} else if (payload.Brightness !== undefined) { | ||
msg['bri'] = payload.Brightness*2.55; | ||
msg['bri'] = Math.round(payload.Brightness*2.55); | ||
msg['on'] = payload.Brightness>0?true:false; | ||
@@ -229,3 +232,3 @@ } else if (payload.Hue !== undefined) { | ||
} else if (payload.Saturation !== undefined) { | ||
msg['sat'] = payload.Saturation*2.55; | ||
msg['sat'] = Math.round(payload.Saturation*2.55); | ||
msg['on'] = true; | ||
@@ -232,0 +235,0 @@ } else if (payload.ColorTemperature !== undefined) { |
@@ -41,3 +41,3 @@ { | ||
}, | ||
"version": "0.11.0" | ||
"version": "0.11.1" | ||
} |
@@ -12,4 +12,2 @@ # node-red-contrib-deconz | ||
<img src="https://github.com/andreypopov/node-red-contrib-deconz/blob/master/readme/1.png?raw=true"> | ||
@@ -20,6 +18,8 @@ <img src="https://github.com/andreypopov/node-red-contrib-deconz/blob/master/readme/2.png?raw=true"> | ||
https://youtu.be/i3TiZiuNofM | ||
[![Watch YouTube video](https://img.youtube.com/vi/i3TiZiuNofM/0.jpg)](https://www.youtube.com/watch?v=i3TiZiuNofM) | ||
Watch YouTube video | ||
# Support | ||
Developing and supporting this plugin needs time and efforts. Appreciate your support on [Patreon](https://www.patreon.com/bePatron?u=12661781). Here, you can sign up to be a member and help support my project. |
@@ -91,4 +91,4 @@ function deconz_gatewayScanner(nodeItem, selectedItemElementName, options = {}) { | ||
(!("meta" in value) | ||
|| !("config" in value.meta) | ||
|| !("battery" in value.meta.config) | ||
|| !("config" in value.meta) | ||
|| !("battery" in value.meta.config) | ||
) | ||
@@ -95,0 +95,0 @@ ) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
898580
2786