@switchbot/homebridge-switchbot 5.0.0-beta.132 → 5.0.0-beta.134
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.
- package/dist/homebridge-ui/public/js/app.js +1 -54
- package/dist/homebridge-ui/public/js/app.js.map +2 -2
- package/dist/homebridge-ui/public/js/modals.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/modals.js +0 -58
- package/dist/homebridge-ui/public/js/modals.js.map +1 -1
- package/dist/homebridge-ui/public/js/modals.ts +0 -63
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +1 -12
- package/dist/platform.js.map +1 -1
- package/docs/variables/default.html +1 -1
- package/package.json +1 -1
- package/src/homebridge-ui/public/js/modals.ts +0 -63
- package/src/platform.ts +1 -12
|
@@ -1925,56 +1925,6 @@ async function importDiscoveredDevice(device) {
|
|
|
1925
1925
|
});
|
|
1926
1926
|
typeSelect.appendChild(optgroup);
|
|
1927
1927
|
});
|
|
1928
|
-
const windowCoveringTypes = ["Roller Shade", "Curtain", "Curtain3", "Blind Tilt"];
|
|
1929
|
-
const matterTypeLabel = document.createElement("label");
|
|
1930
|
-
matterTypeLabel.textContent = "Matter Window Covering Type (Advanced)";
|
|
1931
|
-
matterTypeLabel.style.display = "block";
|
|
1932
|
-
matterTypeLabel.style.marginBottom = "6px";
|
|
1933
|
-
matterTypeLabel.style.fontWeight = "500";
|
|
1934
|
-
matterTypeLabel.style.fontSize = "12px";
|
|
1935
|
-
matterTypeLabel.style.color = "#6b7280";
|
|
1936
|
-
matterTypeLabel.style.marginTop = "2px";
|
|
1937
|
-
const matterTypes = [
|
|
1938
|
-
{ value: "", label: "Auto-detect (recommended)" },
|
|
1939
|
-
{ value: 0, label: "Roller Shade (0)" },
|
|
1940
|
-
{ value: 1, label: "Roman Shade (1)" },
|
|
1941
|
-
{ value: 2, label: "Balloon Shade (2)" },
|
|
1942
|
-
{ value: 3, label: "Woven Wood (3)" },
|
|
1943
|
-
{ value: 4, label: "Drapery (4)" },
|
|
1944
|
-
{ value: 5, label: "Awning (5)" },
|
|
1945
|
-
{ value: 6, label: "Shutter (6)" },
|
|
1946
|
-
{ value: 7, label: "Tilt Blind (7)" },
|
|
1947
|
-
{ value: 8, label: "Blind Tilt (8)" },
|
|
1948
|
-
{ value: 9, label: "Projector Screen (9)" },
|
|
1949
|
-
{ value: 15, label: "Other (15)" }
|
|
1950
|
-
];
|
|
1951
|
-
const matterTypeSelect = document.createElement("select");
|
|
1952
|
-
matterTypeSelect.style.width = "100%";
|
|
1953
|
-
matterTypeSelect.style.marginBottom = "12px";
|
|
1954
|
-
matterTypeSelect.style.padding = "8px 10px";
|
|
1955
|
-
matterTypeSelect.style.borderRadius = "6px";
|
|
1956
|
-
matterTypeSelect.style.fontSize = "14px";
|
|
1957
|
-
matterTypeSelect.style.boxSizing = "border-box";
|
|
1958
|
-
matterTypes.forEach((opt) => {
|
|
1959
|
-
const option = document.createElement("option");
|
|
1960
|
-
option.value = String(opt.value);
|
|
1961
|
-
option.textContent = opt.label;
|
|
1962
|
-
if (device.matterType != null && String(opt.value) === String(device.matterType)) {
|
|
1963
|
-
option.selected = true;
|
|
1964
|
-
}
|
|
1965
|
-
matterTypeSelect.appendChild(option);
|
|
1966
|
-
});
|
|
1967
|
-
function updateMatterTypeVisibility() {
|
|
1968
|
-
if (windowCoveringTypes.includes(typeSelect.value)) {
|
|
1969
|
-
matterTypeLabel.style.display = "block";
|
|
1970
|
-
matterTypeSelect.style.display = "block";
|
|
1971
|
-
} else {
|
|
1972
|
-
matterTypeLabel.style.display = "none";
|
|
1973
|
-
matterTypeSelect.style.display = "none";
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
typeSelect.addEventListener("change", updateMatterTypeVisibility);
|
|
1977
|
-
updateMatterTypeVisibility();
|
|
1978
1928
|
const macLabel = document.createElement("label");
|
|
1979
1929
|
macLabel.textContent = "BLE MAC Address (optional)";
|
|
1980
1930
|
macLabel.style.display = "block";
|
|
@@ -2054,8 +2004,7 @@ async function importDiscoveredDevice(device) {
|
|
|
2054
2004
|
configDeviceType: typeSelect.value || device.type,
|
|
2055
2005
|
address: macInput.value || void 0,
|
|
2056
2006
|
encryptionKey: encryptionKeyInput.value || void 0,
|
|
2057
|
-
keyId: keyIdInput.value || void 0
|
|
2058
|
-
...windowCoveringTypes.includes(typeSelect.value) && matterTypeSelect.value !== "" ? { matterType: Number(matterTypeSelect.value) } : {}
|
|
2007
|
+
keyId: keyIdInput.value || void 0
|
|
2059
2008
|
});
|
|
2060
2009
|
div.addEventListener("click", (event) => {
|
|
2061
2010
|
if (event.target === div) {
|
|
@@ -2068,8 +2017,6 @@ async function importDiscoveredDevice(device) {
|
|
|
2068
2017
|
contentDiv.appendChild(nameInput);
|
|
2069
2018
|
contentDiv.appendChild(typeLabel);
|
|
2070
2019
|
contentDiv.appendChild(typeSelect);
|
|
2071
|
-
contentDiv.appendChild(matterTypeLabel);
|
|
2072
|
-
contentDiv.appendChild(matterTypeSelect);
|
|
2073
2020
|
contentDiv.appendChild(macLabel);
|
|
2074
2021
|
contentDiv.appendChild(macInput);
|
|
2075
2022
|
contentDiv.appendChild(encryptionKeyLabel);
|