@switchbot/homebridge-switchbot 5.2.3 → 5.2.4

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.
@@ -1880,7 +1880,7 @@ async function importDiscoveredDevice(device) {
1880
1880
  ["auto", "ble", "openapi"].forEach((val) => {
1881
1881
  const opt = document.createElement("option");
1882
1882
  opt.value = val;
1883
- opt.text = val.charAt(0).toUpperCase() + val.slice(1);
1883
+ opt.text = val === "ble" ? "BLE" : val === "openapi" ? "OpenAPI" : "Auto";
1884
1884
  opt.selected = (device.connectionPreference || "auto") === val;
1885
1885
  connectionPrefSelect.appendChild(opt);
1886
1886
  });
@@ -2237,7 +2237,7 @@ async function editDevice(device) {
2237
2237
  ["auto", "ble", "openapi"].forEach((val) => {
2238
2238
  const opt = document.createElement("option");
2239
2239
  opt.value = val;
2240
- opt.text = val.charAt(0).toUpperCase() + val.slice(1);
2240
+ opt.text = val === "ble" ? "BLE" : val === "openapi" ? "OpenAPI" : "Auto";
2241
2241
  opt.selected = (device.connectionPreference || "auto") === val;
2242
2242
  connectionPrefSelect.appendChild(opt);
2243
2243
  });