node-red-contrib-dmx-for-ha 0.6.23 → 0.6.24

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.
@@ -225,6 +225,8 @@ module.exports = function (RED) {
225
225
  // ── DMX helpers ───────────────────────────────────────────
226
226
  function scaleToDmx(colorValue, brightness) {
227
227
  brightness = brightness !== undefined ? brightness : 255;
228
+ // Hard zero — never apply any floor when brightness is 0 (OFF)
229
+ if (brightness === 0) return 0;
228
230
  const limited = Math.round((colorValue / 255) * (brightness / 255) * S.dmxLimiter);
229
231
  const gamma = GAMMA_TABLE[Math.max(0, Math.min(255, limited))];
230
232
  // 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.23",
3
+ "version": "0.6.24",
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",