diff --git a/Symcon_Publish_to_Shelly_MQTT/form.json b/Symcon_Publish_to_Shelly_MQTT/form.json index 6fc805e..5cef90b 100644 --- a/Symcon_Publish_to_Shelly_MQTT/form.json +++ b/Symcon_Publish_to_Shelly_MQTT/form.json @@ -43,7 +43,8 @@ { "type": "SelectVariable", "name": "switch_bool", - "caption": "Variable mit dem zu regelnden Shelly Kontakt" + "caption": "Variable mit dem zu regelnden Shelly Kontakt", + "validVariableTypes": [0] } ] diff --git a/Symcon_Publish_to_Shelly_MQTT/module.php b/Symcon_Publish_to_Shelly_MQTT/module.php index 96d6960..ff3bc27 100644 --- a/Symcon_Publish_to_Shelly_MQTT/module.php +++ b/Symcon_Publish_to_Shelly_MQTT/module.php @@ -17,7 +17,7 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule $this->RegisterPropertyInteger("msg_id", 1); $this->RegisterPropertyString("src", "user1"); $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")); $src = GetValue($this->ReadPropertyString("src")); $method = GetValue($this->ReadPropertyString("method")); - $switch_bool = GetValue($this->ReadPropertyBoolean("switch_bool")); + $switch_bool = GetValueBoolean($this->ReadPropertyInteger("switch_bool")); // JSON-Payload erstellen $payload = [ "id" => 0,