This commit is contained in:
mh
2025-05-26 09:30:08 +02:00
parent ee2e2314f8
commit b9724c58c5
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -43,7 +43,8 @@
{ {
"type": "SelectVariable", "type": "SelectVariable",
"name": "switch_bool", "name": "switch_bool",
"caption": "Variable mit dem zu regelnden Shelly Kontakt" "caption": "Variable mit dem zu regelnden Shelly Kontakt",
"validVariableTypes": [0]
} }
] ]
+2 -2
View File
@@ -17,7 +17,7 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule
$this->RegisterPropertyInteger("msg_id", 1); $this->RegisterPropertyInteger("msg_id", 1);
$this->RegisterPropertyString("src", "user1"); $this->RegisterPropertyString("src", "user1");
$this->RegisterPropertyString("method", "Switch.Set"); $this->RegisterPropertyString("method", "Switch.Set");
$this->RegisterPropertyBoolean("switch_bool", false); $this->RegisterPropertyInteger("switch_bool", 0);
} }
@@ -50,7 +50,7 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule
$msg_id = GetValue($this->ReadPropertyInteger("msg_id")); $msg_id = GetValue($this->ReadPropertyInteger("msg_id"));
$src = GetValue($this->ReadPropertyString("src")); $src = GetValue($this->ReadPropertyString("src"));
$method = GetValue($this->ReadPropertyString("method")); $method = GetValue($this->ReadPropertyString("method"));
$switch_bool = GetValue($this->ReadPropertyBoolean("switch_bool")); $switch_bool = GetValueBoolean($this->ReadPropertyInteger("switch_bool"));
// JSON-Payload erstellen // JSON-Payload erstellen
$payload = [ $payload = [
"id" => 0, "id" => 0,