Fixed auth header for tasmota discovery

This commit is contained in:
maziggy
2026-02-04 14:10:11 +01:00
parent 3571cd1a42
commit 4910bce0b2
3 changed files with 23 additions and 25 deletions
+2 -4
View File
@@ -2805,13 +2805,11 @@ export const api = {
// Tasmota Discovery (auto-detects network)
startTasmotaScan: () =>
fetch(`${API_BASE}/smart-plugs/discover/scan`, { method: 'POST' })
.then(res => res.ok ? res.json() : res.json().then(e => { throw new Error(e.detail || `HTTP ${res.status}`); })),
request<TasmotaScanStatus>('/smart-plugs/discover/scan', { method: 'POST' }),
getTasmotaScanStatus: () =>
request<TasmotaScanStatus>('/smart-plugs/discover/status'),
stopTasmotaScan: () =>
fetch(`${API_BASE}/smart-plugs/discover/stop`, { method: 'POST' })
.then(res => res.ok ? res.json() : res.json().then(e => { throw new Error(e.detail || `HTTP ${res.status}`); })),
request<TasmotaScanStatus>('/smart-plugs/discover/stop', { method: 'POST' }),
getDiscoveredTasmotaDevices: () =>
request<DiscoveredTasmotaDevice[]>('/smart-plugs/discover/devices'),
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -23,7 +23,7 @@
<!-- Splash screens for iOS -->
<link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
<script type="module" crossorigin src="/assets/index-DSQkZ1L5.js"></script>
<script type="module" crossorigin src="/assets/index-DLGvpmyc.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-fdAEMOwp.css">
</head>
<body>