From aeb868ab11c45a9b81c7e9791460f09ca1b6edb7 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Mon, 26 May 2025 11:23:17 +0200 Subject: [PATCH] ka --- Symcon_Publish_to_Shelly_MQTT/module.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Symcon_Publish_to_Shelly_MQTT/module.php b/Symcon_Publish_to_Shelly_MQTT/module.php index 212a36d..4956cb3 100644 --- a/Symcon_Publish_to_Shelly_MQTT/module.php +++ b/Symcon_Publish_to_Shelly_MQTT/module.php @@ -20,9 +20,7 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule $this->RegisterPropertyString("method", "Switch.Set"); $this->RegisterPropertyInteger("switch_bool", 0); // ID der Bool-Variable - // Beispiel-Variable zum Triggern der Aktion, damit RequestAction funktioniert - $this->RegisterVariableBoolean("Trigger", "Trigger MQTT", "~Switch"); - $this->EnableAction("Trigger"); + } public function ApplyChanges() @@ -36,15 +34,12 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule */ public function RequestAction($Ident, $Value) { - IPS_LogMessage("ShellySwitchSender", "RequestAction aufgerufen"); - switch ($Ident) { - case "Trigger": - SetValue($this->GetIDForIdent("Trigger"), $Value); + case "GetAction": $this->GetAction(); break; default: - throw new Exception("Ungültige Aktion: $Ident"); + throw new Exception("Invalid action"); } }