ka
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user