diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index 3490bec..d136007 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -128,27 +128,13 @@ class Ladestation_v2 extends IPSModule $data["configuration"] = []; } - $changed = !array_key_exists("EaseeGatewayID", $data["configuration"]); - $gatewayID = (int)($data["configuration"]["EaseeGatewayID"] ?? 0); - - // Vorhandene Gateway-Verbindung aus Version 1.1 uebernehmen. - if ($gatewayID <= 0) { - $instance = IPS_GetInstance($this->InstanceID); - $connectionID = (int)$instance["ConnectionID"]; - if ($connectionID > 0 && IPS_InstanceExists($connectionID)) { - $parent = IPS_GetInstance($connectionID); - if ($parent["ModuleInfo"]["ModuleID"] === self::EASEE_GATEWAY_MODULE_ID) { - $gatewayID = $connectionID; - $changed = true; - } - } - } - - if (!$changed) { + if (array_key_exists("EaseeGatewayID", $data["configuration"])) { return ""; } - $data["configuration"]["EaseeGatewayID"] = $gatewayID; + // In Migrate keine Instanzfunktionen aufrufen: Die Instanzschnittstelle + // wird zu diesem Zeitpunkt erst aufgebaut. + $data["configuration"]["EaseeGatewayID"] = 0; return json_encode($data); }