[bigassfan] Add representation property (#9472)

Signed-off-by: Mark Hilbush <mark@hilbush.com>
This commit is contained in:
Mark Hilbush 2020-12-22 18:31:33 -05:00 committed by GitHub
parent 46b02c5b6e
commit 46bf375db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View 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() {

View 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>