More debug

master
Kuba Orlik 12 months ago
parent b6e684d1f9
commit 79fa039d86

@ -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);

Loading…
Cancel
Save