]> git.basschouten.com Git - openhab-addons.git/commitdiff
[bigassfan] Add representation property (#9472)
authorMark Hilbush <mark@hilbush.com>
Tue, 22 Dec 2020 23:31:33 +0000 (18:31 -0500)
committerGitHub <noreply@github.com>
Tue, 22 Dec 2020 23:31:33 +0000 (15:31 -0800)
Signed-off-by: Mark Hilbush <mark@hilbush.com>
bundles/org.openhab.binding.bigassfan/src/main/java/org/openhab/binding/bigassfan/internal/discovery/BigAssFanDiscoveryService.java
bundles/org.openhab.binding.bigassfan/src/main/resources/OH-INF/thing/thing-types.xml

index 23ed912e7b0adeb47e5484f4e25a983337508899..ea67cc3c4bd3e69c9b8b5cd80c2eb66267c47503 100644 (file)
@@ -238,8 +238,8 @@ public class BigAssFanDiscoveryService extends AbstractDiscoveryService {
 
         ThingUID uid = new ThingUID(thingTypeUid, serialNumber);
         logger.debug("Creating discovery result for UID={}, IP={}", uid, device.getIpAddress());
-        thingDiscovered(
-                DiscoveryResultBuilder.create(uid).withProperties(properties).withLabel(device.getLabel()).build());
+        thingDiscovered(DiscoveryResultBuilder.create(uid).withProperties(properties)
+                .withRepresentationProperty(THING_PROPERTY_MAC).withLabel(device.getLabel()).build());
     }
 
     private void schedulePollJob() {
index cf256e18a326c9bedde7e68425f61e1c18816264..c1b2fd7587b7f1980f78069eea9ba05e14485edc 100644 (file)
@@ -40,6 +40,8 @@
                        <channel id="time" typeId="time"/>
                </channels>
 
+               <representation-property>macAddress</representation-property>
+
                <config-description-ref uri="thing-type:bigassfan:device"/>
        </thing-type>
 
@@ -63,6 +65,8 @@
                        <channel id="time" typeId="time"/>
                </channels>
 
+               <representation-property>macAddress</representation-property>
+
                <config-description-ref uri="thing-type:bigassfan:device"/>
        </thing-type>
 
@@ -76,6 +80,8 @@
                        <channel id="time" typeId="time"/>
                </channels>
 
+               <representation-property>macAddress</representation-property>
+
                <config-description-ref uri="thing-type:bigassfan:device"/>
        </thing-type>