From ceb60c950cbaaeecff3ef9052f584e2dd6e5827c Mon Sep 17 00:00:00 2001 From: hdlee27 <54927573+hdlee27@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:55:43 +0000 Subject: [PATCH] fp2: copy additional header Signed-off-by: hdlee27 <54927573+hdlee27@users.noreply.github.com> --- drivers/Aqara/aqara-presence-sensor/src/fp2/api.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/Aqara/aqara-presence-sensor/src/fp2/api.lua b/drivers/Aqara/aqara-presence-sensor/src/fp2/api.lua index 4f27a277a3..e6c620be3f 100644 --- a/drivers/Aqara/aqara-presence-sensor/src/fp2/api.lua +++ b/drivers/Aqara/aqara-presence-sensor/src/fp2/api.lua @@ -2,6 +2,7 @@ local log = require "log" local json = require "st.json" local RestClient = require "lunchbox.rest" local utils = require "utils" +local st_utils = require "st.utils" local fp2_api = {} fp2_api.__index = fp2_api @@ -48,7 +49,7 @@ function fp2_api.new_device_manager(device_ip, bridge_info, socket_builder) return setmetatable( { - headers = ADDITIONAL_HEADERS, + headers = st_utils.deep_copy(ADDITIONAL_HEADERS), socket_builder = socket_builder, base_url = base_url, }, fp2_api