node-red-contrib-knx-ultimate
Advanced tools
Comparing version
@@ -18,3 +18,9 @@ // Part of this code, thanks to https://github.com/Shnoo/js-CIE-1931-rgb-color-converter | ||
return Ylum ** 0.43 * 100; // Convert to lightness (0 to 100) | ||
let ret = Ylum ** 0.43 * 100;// Convert to lightness (0 to 100) | ||
// Boundary Check (min 0, max 100) | ||
ret = ret < 0 ? 0 : ret; | ||
ret = ret > 100 ? 100 : ret; | ||
return ret; | ||
} | ||
@@ -21,0 +27,0 @@ |
@@ -56,2 +56,9 @@ module.exports = { | ||
xy[1] = precision(xy[1]); | ||
// Check boundary (min 0, max 1) | ||
xy[0] = xy[0] < 0 ? 0 : xy[0]; | ||
xy[0] = xy[0] > 1 ? 1 : xy[0]; | ||
xy[1] = xy[1] < 0 ? 0 : xy[1]; | ||
xy[1] = xy[1] > 1 ? 1 : xy[1]; | ||
return { x: xy[0], y: xy[1] }; | ||
@@ -58,0 +65,0 @@ }, |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "3.2.16", | ||
"version": "3.2.17", | ||
"description": "Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.", | ||
@@ -9,0 +9,0 @@ "dependencies": { |
@@ -80,3 +80,3 @@  | ||
| KNX 3rd PARTY IOT API client |  | | ||
| Matter |  | | ||
| Matter |  | | ||
@@ -83,0 +83,0 @@ <br/> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
6378907
012571
0.06%