Skip to content

Commit

Permalink
[miio] fix typo (#10894)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Verpaalen <[email protected]>
  • Loading branch information
marcelrv authored Jun 21, 2021
1 parent a04f331 commit ef1deff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class MiIoBasicChannel {
private @Nullable String channelCustomRefreshCommand;
@SerializedName("transformation")
@Expose
private @Nullable String transfortmation;
private @Nullable String transformation;
@SerializedName("ChannelGroup")
@Expose
private @Nullable String channelGroup;
Expand Down Expand Up @@ -217,12 +217,12 @@ public void setActions(List<MiIoDeviceAction> miIoDeviceActions) {
this.miIoDeviceActions = miIoDeviceActions;
}

public @Nullable String getTransfortmation() {
return transfortmation;
public @Nullable String getTransformation() {
return transformation;
}

public void setTransfortmation(@Nullable String transfortmation) {
this.transfortmation = transfortmation;
public void setTransformation(@Nullable String transformation) {
this.transformation = transformation;
}

public @Nullable String getCategory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ private void updateChannel(@Nullable MiIoBasicChannel basicChannel, String param
logger.debug("Channel not found for {}", param);
return;
}
final String transformation = basicChannel.getTransfortmation();
final String transformation = basicChannel.getTransformation();
if (transformation != null) {
JsonElement transformed = Conversions.execute(transformation, val);
logger.debug("Transformed with '{}': {} {} -> {} ", transformation, basicChannel.getFriendlyName(), val,
Expand Down Expand Up @@ -663,7 +663,7 @@ public void onMessageReceived(MiIoSendCommand response) {
if (ch != null) {
if (response.getResult().isJsonArray()) {
JsonArray cmdResponse = response.getResult().getAsJsonArray();
final String transformation = ch.getTransfortmation();
final String transformation = ch.getTransformation();
if (transformation == null || transformation.isBlank()) {
JsonElement response0 = cmdResponse.get(0);
updateChannel(ch, ch.getChannel(), response0.isJsonPrimitive() ? response0
Expand Down

0 comments on commit ef1deff

Please sign in to comment.