Skip to content

Commit

Permalink
[miio] Move (remaining) channel details to json files (#11568)
Browse files Browse the repository at this point in the history
Move remaining channel details to the respective channels to simplify
and avoid mistakes/errors.

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
  • Loading branch information
marcelrv committed Nov 20, 2021
1 parent d0837ae commit bd49ad4
Show file tree
Hide file tree
Showing 42 changed files with 494 additions and 961 deletions.
68 changes: 49 additions & 19 deletions bundles/org.openhab.binding.miio/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public class MiIoBasicChannel {
@SerializedName("channel")
@Expose
private @Nullable String channel;
@SerializedName("description")
@Expose
private @Nullable String description;
@SerializedName("channelType")
@Expose
private @Nullable String channelType;
Expand Down Expand Up @@ -142,6 +145,15 @@ public void setChannel(@Nullable String channel) {
this.channel = channel;
}

public String getDescription() {
final String description = this.description;
return description != null ? description : "";
}

public void setDescription(@Nullable String description) {
this.description = description;
}

public String getChannelType() {
final @Nullable String ct = channelType;
if (ct == null || ct.isEmpty()) {
Expand Down
Loading

0 comments on commit bd49ad4

Please sign in to comment.