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))