[miio] fix typo (#10894)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
parent
a04f331011
commit
ef1deff4e9
@ -68,7 +68,7 @@ public class MiIoBasicChannel {
|
|||||||
private @Nullable String channelCustomRefreshCommand;
|
private @Nullable String channelCustomRefreshCommand;
|
||||||
@SerializedName("transformation")
|
@SerializedName("transformation")
|
||||||
@Expose
|
@Expose
|
||||||
private @Nullable String transfortmation;
|
private @Nullable String transformation;
|
||||||
@SerializedName("ChannelGroup")
|
@SerializedName("ChannelGroup")
|
||||||
@Expose
|
@Expose
|
||||||
private @Nullable String channelGroup;
|
private @Nullable String channelGroup;
|
||||||
@ -217,12 +217,12 @@ public class MiIoBasicChannel {
|
|||||||
this.miIoDeviceActions = miIoDeviceActions;
|
this.miIoDeviceActions = miIoDeviceActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable String getTransfortmation() {
|
public @Nullable String getTransformation() {
|
||||||
return transfortmation;
|
return transformation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransfortmation(@Nullable String transfortmation) {
|
public void setTransformation(@Nullable String transformation) {
|
||||||
this.transfortmation = transfortmation;
|
this.transformation = transformation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable String getCategory() {
|
public @Nullable String getCategory() {
|
||||||
|
|||||||
@ -558,7 +558,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
|
|||||||
logger.debug("Channel not found for {}", param);
|
logger.debug("Channel not found for {}", param);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final String transformation = basicChannel.getTransfortmation();
|
final String transformation = basicChannel.getTransformation();
|
||||||
if (transformation != null) {
|
if (transformation != null) {
|
||||||
JsonElement transformed = Conversions.execute(transformation, val);
|
JsonElement transformed = Conversions.execute(transformation, val);
|
||||||
logger.debug("Transformed with '{}': {} {} -> {} ", transformation, basicChannel.getFriendlyName(), val,
|
logger.debug("Transformed with '{}': {} {} -> {} ", transformation, basicChannel.getFriendlyName(), val,
|
||||||
@ -663,7 +663,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
|
|||||||
if (ch != null) {
|
if (ch != null) {
|
||||||
if (response.getResult().isJsonArray()) {
|
if (response.getResult().isJsonArray()) {
|
||||||
JsonArray cmdResponse = response.getResult().getAsJsonArray();
|
JsonArray cmdResponse = response.getResult().getAsJsonArray();
|
||||||
final String transformation = ch.getTransfortmation();
|
final String transformation = ch.getTransformation();
|
||||||
if (transformation == null || transformation.isBlank()) {
|
if (transformation == null || transformation.isBlank()) {
|
||||||
JsonElement response0 = cmdResponse.get(0);
|
JsonElement response0 = cmdResponse.get(0);
|
||||||
updateChannel(ch, ch.getChannel(), response0.isJsonPrimitive() ? response0
|
updateChannel(ch, ch.getChannel(), response0.isJsonPrimitive() ? response0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user