From 86409b26f062fb2ecae9c88cc4749bbfc4a8e16f Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Fri, 28 Nov 2025 07:51:48 +0100 Subject: [PATCH] garaga page 6 --- apps/ui/static/api-client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/ui/static/api-client.js b/apps/ui/static/api-client.js index 875bacd..901241f 100644 --- a/apps/ui/static/api-client.js +++ b/apps/ui/static/api-client.js @@ -102,12 +102,14 @@ class HomeAutomationClient { * @returns {Promise} */ async setDeviceState(deviceId, type, payload) { + const requestBody = { type, payload }; + console.log('API setDeviceState request:', requestBody); await fetch(this.api(`/devices/${deviceId}/set`), { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ type, payload }) + body: JSON.stringify(requestBody) }); }