From 79fa039d864c85aab41528794930f20b4bf37a50 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sat, 30 Dec 2023 14:17:44 +0100 Subject: [PATCH] More debug --- light-loop.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/light-loop.js b/light-loop.js index a8accc1..76df5c6 100644 --- a/light-loop.js +++ b/light-loop.js @@ -6,6 +6,14 @@ const { lights } = require("./config.js"); async function send_color(light_data, color, max_brightness, debug) { const brightness = (color[0] + color[1] + color[2]) / 3 / 255; + if (debug) { + console.log( + "sum", + color[0] + color[1] + color[2], + "brightness", + brightness + ); + } let body = { entity_id: `light.${light_data.id}`, transition: 0.18 }; if (debug) { console.log("sending", body);