Skip to content

Commit 13f9c51

Browse files
committed
Option to disable lamps in HA wizard
1 parent c24549c commit 13f9c51

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Diff for: www/i18n/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1269,5 +1269,5 @@
12691269
"select_ha_intro": "Select Home Assistant",
12701270
"edt_dev_spec_constantBrightness_title": "Constant brightness",
12711271
"edt_conf_reorder_displays_title": "Reorder displays",
1272-
"edt_conf_reorder_displays_expl": "Manipulate the order (permutations) of the displays until you get the correct one in multi-display mode"
1272+
"edt_conf_reorder_displays_expl": "Manipulate the order (permutations) of the displays until you get the correct one in multi-monitor mode"
12731273
}

Diff for: www/js/wizard.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -2577,7 +2577,7 @@ function identify_ha_device(host, token, id)
25772577
function createHaLedConfig(haConfig)
25782578
{
25792579
var lightOptions = [
2580-
"top", "topleft", "topright",
2580+
"disabled", "top", "topleft", "topright",
25812581
"bottom", "bottomleft", "bottomright",
25822582
"left", "lefttop", "leftmiddle", "leftbottom",
25832583
"right", "righttop", "rightmiddle", "rightbottom",
@@ -2606,8 +2606,14 @@ function createHaLedConfig(haConfig)
26062606
var idx_content = assignLightPos(key, defaultPosition, _haConfig.lamps[key].name);
26072607

26082608
_haConfig.lamps[key].defaultPosition = defaultPosition;
2609-
ledDef.push(JSON.parse(JSON.stringify(idx_content)));
2609+
if (defaultPosition != "disabled")
2610+
{
2611+
ledDef.push(JSON.parse(JSON.stringify(idx_content)));
2612+
}
26102613
}
2614+
2615+
_haConfig.lamps = _haConfig.lamps.filter(item => item.defaultPosition != "disabled");
2616+
26112617
window.serverConfig.leds = ledDef;
26122618
requestWriteConfig({ "leds": window.serverConfig.leds });
26132619
window.serverConfig.device = _haConfig;

0 commit comments

Comments
 (0)