From 5aeabd0d248651aaf429a4aea9dd660b0d12bd7e Mon Sep 17 00:00:00 2001 From: Gene Date: Wed, 4 Dec 2024 22:59:28 +0100 Subject: [PATCH] - Fix *Api.Call(..)* method bug --- src/HomeGenie/Automation/Scripting/ApiHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HomeGenie/Automation/Scripting/ApiHelper.cs b/src/HomeGenie/Automation/Scripting/ApiHelper.cs index e544d947..da538abc 100644 --- a/src/HomeGenie/Automation/Scripting/ApiHelper.cs +++ b/src/HomeGenie/Automation/Scripting/ApiHelper.cs @@ -135,7 +135,7 @@ public object Call(string apiCommand, object data = null) NetHelper netHelper = new NetHelper(homegenie); netHelper .WebService($"http://localhost:{port}/api/{apiCommand}") - .Put(JsonConvert.SerializeObject(data)); + .Put(data?.ToString()); var username = homegenie.SystemConfiguration.HomeGenie.Username; var password = homegenie.SystemConfiguration.HomeGenie.Password; if (!String.IsNullOrEmpty(username) && !String.IsNullOrEmpty(password))