mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Update blink1 node so green is brighter
This commit is contained in:
parent
6122dcd069
commit
e87eb2fb44
@ -28,6 +28,7 @@
|
|||||||
<script type="text/x-red" data-help-name="blink1">
|
<script type="text/x-red" data-help-name="blink1">
|
||||||
<p>ThingM Blink1 output node.</p>
|
<p>ThingM Blink1 output node.</p>
|
||||||
<p>Expects a msg.payload with either a three part csv string of r,g,b or a hex colour #rrggbb</p>
|
<p>Expects a msg.payload with either a three part csv string of r,g,b or a hex colour #rrggbb</p>
|
||||||
|
<p>Also accepts cheerlight colour names.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -51,7 +51,7 @@ module.exports = function(RED) {
|
|||||||
else {
|
else {
|
||||||
// you can add fancy colours by name here if you want...
|
// you can add fancy colours by name here if you want...
|
||||||
// these are the @cheerlight ones.
|
// these are the @cheerlight ones.
|
||||||
var colors = {"red":"#FF0000","green":"#008000","blue":"#0000FF","cyan":"#00FFFF","white":"#FFFFFF","warmwhite":"#FDF5E6",
|
var colors = {"red":"#FF0000","green":"#00FF00","blue":"#0000FF","cyan":"#00FFFF","white":"#FFFFFF","warmwhite":"#FDF5E6",
|
||||||
"purple":"#800080","magenta":"#FF00FF","yellow":"#FFFF00","amber":"#FFD200","orange":"#FFA500","black":"#000000"}
|
"purple":"#800080","magenta":"#FF00FF","yellow":"#FFFF00","amber":"#FFD200","orange":"#FFA500","black":"#000000"}
|
||||||
if (msg.payload.toLowerCase() in colors) {
|
if (msg.payload.toLowerCase() in colors) {
|
||||||
var c = colors[msg.payload.toLowerCase()];
|
var c = colors[msg.payload.toLowerCase()];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-blink1",
|
"name" : "node-red-node-blink1",
|
||||||
"version" : "0.0.1",
|
"version" : "0.0.2",
|
||||||
"description" : "A Node-RED node to control a Thingm Blink(1)",
|
"description" : "A Node-RED node to control a Thingm Blink(1)",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"node-blink1" : "0.1.2"
|
"node-blink1" : "0.1.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user