node-red-contrib-dmx-for-ha 0.6.18 → 0.6.19
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.
- package/nodes/ha-mqtt-dmx.js +2 -0
- package/package.json +1 -1
package/nodes/ha-mqtt-dmx.js
CHANGED
|
@@ -226,6 +226,8 @@ module.exports = function (RED) {
|
|
|
226
226
|
// ── DMX helpers ───────────────────────────────────────────
|
|
227
227
|
function scaleToDmx(colorValue, brightness) {
|
|
228
228
|
brightness = brightness !== undefined ? brightness : 255;
|
|
229
|
+
// Hard zero — never apply any floor when brightness is 0 (OFF)
|
|
230
|
+
if (brightness === 0) return 0;
|
|
229
231
|
const limited = Math.round((colorValue / 255) * (brightness / 255) * S.dmxLimiter);
|
|
230
232
|
const gamma = GAMMA_TABLE[Math.max(0, Math.min(255, limited))];
|
|
231
233
|
// Min output floor — only apply when both inputs are non-zero (intentionally on)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-dmx-for-ha",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.19",
|
|
4
4
|
"description": "DMX lighting control for Home Assistant via Node-RED and MQTT. Place a node, fill in the settings, deploy. Full HA device registry integration with RGBW/RGBWW/CCT/brightness colour modes, transitions, effects, and group control.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|