Skip to content

Commit

Permalink
Yamaha zones: Add representation-property (openhab#4314)
Browse files Browse the repository at this point in the history
* Yamaha zones: Add representation-property

Also-by: Wouter Born <eclipse@maindrain.net>
Signed-off-by: David Graeff <david.graeff@web.de>
Signed-off-by: Pascal Larin <plarin@gmail.com>
  • Loading branch information
David Gräff authored and chaton78 committed Jan 1, 2019
1 parent 769cd63 commit 202005a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<property name="assigned_name"/>
</properties>

<representation-property>host</representation-property>

<config-description>
<parameter name="host" type="text" required="true">
<context>network-address</context>
Expand Down Expand Up @@ -80,6 +82,8 @@
<channel-group typeId="navigation_channels" id="navigation_channels"/>
</channel-groups>

<representation-property>zone</representation-property>

<config-description>
<parameter name="zone" type="text" required="true">
<label>Zone</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ public void publishZones(DeviceInformationState state, ThingUID bridgeUid) {
Map<String, Object> properties = new HashMap<>();
properties.put(CONFIG_ZONE, zoneName);

DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(uid)
.withProperties(properties)
.withLabel(state.name + " " + zoneName)
.withBridge(bridgeUid)
.build();

DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(uid).withProperties(properties)
.withLabel(state.name + " " + zoneName).withBridge(bridgeUid)
.withRepresentationProperty(CONFIG_ZONE).build();

thingDiscovered(discoveryResult);
}
}
Expand Down

0 comments on commit 202005a

Please sign in to comment.