[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:
Marcel 2020-12-22 22:49:26 +01:00 committed by GitHub
parent 7b2bf4b95e
commit 09b1037ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -161,6 +161,7 @@ public class MiIoVacuumHandler extends MiIoAbstractHandler {
} }
return null; return null;
}); });
updateState(RobotCababilities.SEGMENT_CLEAN.getChannel(), new StringType("-"));
} }
@Override @Override
@ -227,9 +228,10 @@ public class MiIoVacuumHandler extends MiIoAbstractHandler {
forceStatusUpdate(); forceStatusUpdate();
return; 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() + "]"); sendCommand(MiIoCommand.START_SEGMENT, "[" + command.toString() + "]");
updateState(RobotCababilities.SEGMENT_CLEAN.getChannel(), UnDefType.UNDEF); updateState(RobotCababilities.SEGMENT_CLEAN.getChannel(), new StringType("-"));
forceStatusUpdate(); forceStatusUpdate();
return; return;
} }