]> git.basschouten.com Git - openhab-addons.git/commitdiff
Nobø hub addon: Add more component types with serial numbers. (#13326)
authorJørgen Austvik <jaustvik@acm.org>
Sun, 28 Aug 2022 11:50:56 +0000 (13:50 +0200)
committerGitHub <noreply@github.com>
Sun, 28 Aug 2022 11:50:56 +0000 (13:50 +0200)
Minor change which gives more properties to detected things, which
should make a little easyer for users with these devices to identify them.

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/NoboHubBindingConstants.java
bundles/org.openhab.binding.nobohub/src/test/java/org/openhab/binding/nobohub/internal/model/SerialNumberTest.java

index 712598bd6e4e7d2337515a7a4b78eb0cec50fd2c..2cc2d98c5282cddf042712e2b4193bd7d1e0eb8b 100644 (file)
@@ -108,9 +108,16 @@ public class NoboHubBindingConstants {
                     Collections::<String, String> unmodifiableMap));
 
     // Full list of units: https://help.nobo.no/skriver/?chapterid=344&chapterlanguageid=2
-    public static final Map<String, String> SERIALNUMBERS_FOR_TYPES = Stream
-            .of(new String[][] { { "120", "RS-700" }, { "168", "NCU-2R" }, { "184", "NCU-1R" }, { "186", "NTD-4R" },
-                    { "192", "TXF" }, { "198", "NCU-ER" }, { "210", "NTB-2R" }, { "234", "Nobø Switch" }, })
-            .collect(Collectors.collectingAndThen(Collectors.toMap(data -> data[0], data -> data[1]),
-                    Collections::<String, String> unmodifiableMap));
+    public static final Map<String, String> SERIALNUMBERS_FOR_TYPES = Stream.of(new String[][] { { "100", "EC-700" },
+            { "102", "Eco Hub" }, { "103", "Quantum Hub" }, { "105", "Ewt Plus" }, { "120", "RS-700" },
+            { "130", "RCE-700" }, { "121", "RSX-700" }, { "160", "R80 RDC-700" }, { "165", "R80 RDC-700 LST" },
+            { "168", "NCU-2R" }, { "169", "DCU-2R" }, { "170", "Series 18 Ewt Touch" }, { "180", "2NC9-700" },
+            { "182", "R80 RSC-700 5-24" }, { "183", "R80 RSC-700 5-30" }, { "184", "NCU-1R" },
+            { "186", "NTD-4R/DCU-1R" }, { "190", "S16-700 Safir" }, { "192", "R80 TXF-700" }, { "194", "R80 RXC-700" },
+            { "198", "NCU-ER" }, { "199", "DCU-ER" }, { "200", "TRB-700" }, { "210", "NTB-2R" }, { "220", "TR36-700" },
+            { "230", "TCU-700" }, { "231", "THB-700" }, { "232", "TXB-700" }, { "233", "EcoSense MSW" },
+            { "234", "Nobø Eco Switch" },
+
+    }).collect(Collectors.collectingAndThen(Collectors.toMap(data -> data[0], data -> data[1]),
+            Collections::<String, String> unmodifiableMap));
 }
index cff376a4b77a6d1343eaf06b390200511fcc128d..23833111e1c63a0c3d80f990d929a5e181cb05aa 100644 (file)
@@ -45,8 +45,8 @@ public class SerialNumberTest {
 
     @Test
     public void testGetComponentType() {
-        assertEquals("NTD-4R", new SerialNumber("186170024143").getComponentType());
-        assertEquals("Nobø Switch", new SerialNumber("234001021010").getComponentType());
+        assertEquals("NTD-4R/DCU-1R", new SerialNumber("186170024143").getComponentType());
+        assertEquals("Nobø Eco Switch", new SerialNumber("234001021010").getComponentType());
         assertEquals("Unknown, please contact maintainer to add a new type for 123123123123",
                 new SerialNumber("123123123123").getComponentType());
         assertEquals("Unknown, please contact maintainer to add a new type for foobar",