From b9ce8b395bd2aed7fe176bd5fdbc5a01a3116201 Mon Sep 17 00:00:00 2001 From: Markus Michels Date: Sun, 7 Jul 2024 09:48:51 +0200 Subject: [PATCH] Fixes #16990 - Gen1 nbo longer initializes when defined in .things (#17009) Signed-off-by: Markus Michels --- .../binding/shelly/internal/handler/ShellyBaseHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyBaseHandler.java b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyBaseHandler.java index 04d04cd445d2b..a8ab8cfe03ed0 100755 --- a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyBaseHandler.java +++ b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyBaseHandler.java @@ -156,8 +156,8 @@ public ShellyBaseHandler(final Thing thing, final ShellyTranslationProvider tran Map properties = thing.getProperties(); String gen = getString(properties.get(PROPERTY_DEV_GEN)); String thingType = getThingType(); - gen2 = !"1".equals(gen) || ShellyDeviceProfile.isGeneration2(thingType); blu = ShellyDeviceProfile.isBluSeries(thingType); + gen2 = "2".equals(gen) || "3".equals(gen) || blu || ShellyDeviceProfile.isGeneration2(thingType); this.api = !blu ? !gen2 ? new Shelly1HttpApi(thingName, this) : new Shelly2ApiRpc(thingName, thingTable, this) : new ShellyBluApi(thingName, thingTable, this); if (gen2) {