Skip to content

Commit c623e6e

Browse files
committed
.
1 parent 29423d3 commit c623e6e

File tree

8 files changed

+4
-120
lines changed

8 files changed

+4
-120
lines changed

nodes/knxUltimateHueLight.html

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -976,17 +976,6 @@
976976
RED.sidebar.show("help");
977977
} catch (error) { }
978978
onEditPrepare();
979-
node.yamlEditor = RED.editor.createEditor({
980-
id: 'aceEditor',
981-
mode: 'ace/mode/text'
982-
});
983-
node.yamlEditor.session.setValue(yamelize());
984-
$('[id*="node-input-"]').on('keyup change autocompletechange', function () {
985-
try {
986-
node.yamlEditor.session.setValue(yamelize());
987-
} catch (error) {
988-
}
989-
});
990979
}
991980

992981

@@ -1217,74 +1206,6 @@
12171206

12181207
return toHex(red, green, blue, alpha);
12191208
}
1220-
function yamelize() {
1221-
try {
1222-
const getVal = (selector) => {
1223-
const $el = $(selector);
1224-
if (!$el || !$el.length) return '';
1225-
const raw = $el.val();
1226-
if (raw === undefined || raw === null) return '';
1227-
return typeof raw === 'string' ? raw.trim() : String(raw);
1228-
};
1229-
const appendLine = (label, value) => {
1230-
if (value) {
1231-
sYaml += ` ${label}: "${value}"\n`;
1232-
}
1233-
};
1234-
1235-
const name = getVal('#node-input-name').replace(/"/g, '\\"');
1236-
let sYaml = `- name: "${name}"\n`;
1237-
1238-
appendLine('address', getVal('#node-input-GALightSwitch'));
1239-
appendLine('state_address', getVal('#node-input-GALightState'));
1240-
appendLine('brightness_address', getVal('#node-input-GALightBrightness'));
1241-
appendLine('brightness_state_address', getVal('#node-input-GALightBrightnessState'));
1242-
1243-
// Color temperature handling -----------------------------------
1244-
let colorTemperatureConfigured = false;
1245-
const kelvinPercent = getVal('#node-input-GALightKelvinPercentage');
1246-
if (kelvinPercent) {
1247-
sYaml += ' color_temperature_mode: relative\n';
1248-
appendLine('color_temperature_address', kelvinPercent);
1249-
appendLine('color_temperature_state_address', getVal('#node-input-GALightKelvinPercentageState'));
1250-
colorTemperatureConfigured = true;
1251-
} else {
1252-
const kelvinAddress = getVal('#node-input-GALightKelvin');
1253-
if (kelvinAddress) {
1254-
const kelvinDpt = getVal('#node-input-dptLightKelvin');
1255-
if (kelvinDpt === '7.600') {
1256-
sYaml += ' color_temperature_mode: absolute\n';
1257-
appendLine('color_temperature_address', kelvinAddress);
1258-
if (getVal('#node-input-dptLightKelvinState') === '7.600') {
1259-
appendLine('color_temperature_state_address', getVal('#node-input-GALightKelvinState'));
1260-
}
1261-
colorTemperatureConfigured = true;
1262-
} else if (kelvinDpt === '9.002') {
1263-
sYaml += ' color_temperature_mode: absolute_float\n';
1264-
appendLine('color_temperature_address', kelvinAddress);
1265-
if (getVal('#node-input-dptLightKelvinState') === '9.002') {
1266-
appendLine('color_temperature_state_address', getVal('#node-input-GALightKelvinState'));
1267-
}
1268-
colorTemperatureConfigured = true;
1269-
}
1270-
}
1271-
}
1272-
if (colorTemperatureConfigured) {
1273-
sYaml += ' min_kelvin: 2200\n';
1274-
sYaml += ' max_kelvin: 6500\n';
1275-
}
1276-
1277-
appendLine('color_address', getVal('#node-input-GALightColor'));
1278-
appendLine('color_state_address', getVal('#node-input-GALightColorState'));
1279-
appendLine('hue_address', getVal('#node-input-GALightHSV_H_DIM'));
1280-
appendLine('hue_state_address', getVal('#node-input-GALightHSV_H_State'));
1281-
appendLine('saturation_address', getVal('#node-input-GALightHSV_S_DIM'));
1282-
appendLine('saturation_state_address', getVal('#node-input-GALightHSV_S_State'));
1283-
1284-
return sYaml;
1285-
} catch (error) { }
1286-
}
1287-
12881209
}())
12891210

12901211
</script>
@@ -1348,7 +1269,6 @@
13481269
<li><a href="#tabs-4"><i class="fa-solid fa-palette"></i> <span data-i18n="knxUltimateHueLight.tabs.rgb_hsv"></span></a></li>
13491270
<li><a href="#tabs-5"><i class="fa-solid fa-heart-circle-check"></i> <span data-i18n="knxUltimateHueLight.tabs.effects"></span></a></li>
13501271
<li><a href="#tabs-6"><i class="fa-solid fa-code-merge"></i> <span data-i18n="knxUltimateHueLight.tabs.behaviour"></span></a></li>
1351-
<li><a href="#tabs-7"><i class="fa-solid fa-house"></i> <span data-i18n="knxUltimateHueLight.tabs.ha_export"></span></a></li>
13521272
</ul>
13531273
<div id="tabs-1">
13541274
<p>
@@ -1876,13 +1796,6 @@
18761796
</div>
18771797
</p>
18781798
</div>
1879-
<div id="tabs-7">
1880-
<p>
1881-
<br/> <b>YAML</b> <br/>
1882-
<div style="height: 220px; min-height:150px;" class="node-text-editor" id="aceEditor"></div>
1883-
<!-- <button type="button" class="red-ui-button">Button</button> -->
1884-
</p>
1885-
</div>
18861799
</div>
18871800
</div>
18881801
<br />

nodes/locales/de-DE/knxUltimateHueLight.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,5 @@
9595

9696
Hinweis: Start/Stop‑Dimmen im KNX‑Modus wird über die üblichen Start/Stop‑Telegramme gesteuert.
9797

98-
<br/>
99-
100-
**Home Assistant Export**
101-
102-
| Eigenschaft | Beschreibung |
103-
|--|--|
104-
| YAML | Node‑Eigenschaften im Home‑Assistant‑YAML‑Format exportieren. YAML wird beim Bearbeiten generiert und kann in „knx_lights.yaml“ eingefügt werden. |
105-
10698
<br/>
10799
</script>

nodes/locales/de/knxUltimateHueLight.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"tunable_white": "Einstellbares Weiß",
1717
"rgb_hsv": "RGB/HSV",
1818
"effects": "Effekte",
19-
"behaviour": "Verhalten",
20-
"ha_export": "Home Assistant Export (BETA)"
19+
"behaviour": "Verhalten"
2120
},
2221
"control": "Steuerung",
2322
"status": "Status",

nodes/locales/en-US/knxUltimateHueLight.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,4 @@
9999

100100
The Dimming function works in **KNX mode `start` and `stop`**. To start dimming, send only one "start" KNX telegram. To stop dimming, send a "stop" KNX telegram. Please **remember that**, when you set your wall swiches properties.
101101

102-
<br/>
103-
104-
**Home Assistant Export**
105-
106-
| Property | Description |
107-
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
108-
| YAML | Get or sets the node properties based on Home Assistant YAML format. By editing the node properties, the YAML will automatically be created. You can copy and paste it into the "knx_lights.yaml" Home Assistant config file. Not yet implemented: likewise, if you copy the single light descriptor from the "knx_lights.yaml" Home Assistant config file and paste it here, the relative node properties will be automatically set. |
109-
110-
<br/>
111102
</script>

nodes/locales/en-US/knxUltimateHueLight.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"tunable_white": "Tunable white",
1717
"rgb_hsv": "RGB/HSV",
1818
"effects": "Effects",
19-
"behaviour": "Behaviour",
20-
"ha_export": "Home Assistant Export (BETA)"
19+
"behaviour": "Behaviour"
2120
},
2221
"control": "Control",
2322
"status": "Status",

nodes/locales/it/knxUltimateHueLight.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"tunable_white": "Bianco regolabile",
1717
"rgb_hsv": "RGB/HSV",
1818
"effects": "Effetti",
19-
"behaviour": "Comportamento",
20-
"ha_export": "Esportazione Home Assistant (BETA)"
19+
"behaviour": "Comportamento"
2120
},
2221
"control": "Comando",
2322
"status": "Stato",

nodes/locales/zh-CN/knxUltimateHueLight.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,5 @@
9999

100100
调光功能在** knx模式`启动``''''和st off'**中起作用。要开始调暗,只发送一个“启动” knx电报。要停止调暗,请发送“停止” KNX电报。请**请记住**,当您设置墙壁时,请记住。
101101

102-
<br/>
103-
104-
**家庭助理出口**
105-
106-
|属性|描述|
107-
|----------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
108-
|yaml |根据家庭助理YAML格式获取或设置节点属性。通过编辑节点属性,将自动创建YAML。您可以将其复制并粘贴到“ knx_lights.yaml”家庭助理配置文件中。尚未实现:同样,如果您从“ knx_lights.yaml” Home Assistant Config File复制单个灯光描述符并在此处粘贴,则相对节点属性将自动设置。|
109-
110102
<br/>
111103
</script>

nodes/locales/zh-CN/knxUltimateHueLight.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"tunable_white": "可调白光",
1717
"rgb_hsv": "RGB/HSV",
1818
"effects": "效果",
19-
"behaviour": "行为",
20-
"ha_export": "Home Assistant 导出 (测试版)"
19+
"behaviour": "行为"
2120
},
2221
"control": "控制",
2322
"status": "状态",

0 commit comments

Comments
 (0)