diff --git a/src/widgets/homebridge/proxy.js b/src/widgets/homebridge/proxy.js index 018aa78f..b0a75a03 100644 --- a/src/widgets/homebridge/proxy.js +++ b/src/widgets/homebridge/proxy.js @@ -52,7 +52,7 @@ async function apiCall(widget, endpoint, service) { if (status === 401 || status === 403) { logger.debug("Homebridge API rejected the request, attempting to obtain new session token"); - const { accessToken } = login(widget, service); + const { accessToken } = await login(widget, service); headers.Authorization = `Bearer ${accessToken}`; // retry the request, now with the new session token