diff --git a/Shelly_Parser_MQTT/module.php b/Shelly_Parser_MQTT/module.php index aa85ff9..ce1a109 100644 --- a/Shelly_Parser_MQTT/module.php +++ b/Shelly_Parser_MQTT/module.php @@ -223,18 +223,31 @@ class Shelly_Parser_MQTT extends IPSModule foreach (IPS_GetChildrenIDs($folder) as $cid) { if (IPS_GetObject($cid)['ObjectIdent'] === $ident) { + + // ---- Action wieder setzen, falls sie fehlt ---- + if (str_contains($ident, '_output_')) { + IPS_SetVariableCustomAction($cid, $this->InstanceID); + } + return $cid; } } + // Variable neu anlegen $vid = IPS_CreateVariable(0); IPS_SetName($vid, $name); IPS_SetIdent($vid, $ident); IPS_SetParent($vid, $folder); + // ---- HIER: Action für Output-Variablen setzen ---- + if (str_contains($ident, '_output_')) { + IPS_SetVariableCustomAction($vid, $this->InstanceID); + } + return $vid; } + private function EnsureFloatVariable(string $deviceID, string $ident, string $name): int { $folder = $this->GetDeviceFolder($deviceID);