[miio] change vacuum segment channel from undef to - (#9371)
To support alexa integration. closing #9172 Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
parent
7b2bf4b95e
commit
09b1037ea1
|
@ -161,6 +161,7 @@ public class MiIoVacuumHandler extends MiIoAbstractHandler {
|
|||
}
|
||||
return null;
|
||||
});
|
||||
updateState(RobotCababilities.SEGMENT_CLEAN.getChannel(), new StringType("-"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -227,9 +228,10 @@ public class MiIoVacuumHandler extends MiIoAbstractHandler {
|
|||
forceStatusUpdate();
|
||||
return;
|
||||
}
|
||||
if (channelUID.getId().equals(RobotCababilities.SEGMENT_CLEAN.getChannel()) && !command.toString().isEmpty()) {
|
||||
if (channelUID.getId().equals(RobotCababilities.SEGMENT_CLEAN.getChannel()) && !command.toString().isEmpty()
|
||||
&& !command.toString().contentEquals("-")) {
|
||||
sendCommand(MiIoCommand.START_SEGMENT, "[" + command.toString() + "]");
|
||||
updateState(RobotCababilities.SEGMENT_CLEAN.getChannel(), UnDefType.UNDEF);
|
||||
updateState(RobotCababilities.SEGMENT_CLEAN.getChannel(), new StringType("-"));
|
||||
forceStatusUpdate();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue