Skip to content

Commit

Permalink
[miio] Add support for new dreame vacuum models (p2027,p2028,p2059) (o…
Browse files Browse the repository at this point in the history
…penhab#11669)

Signed-off-by: Marcel Verpaalen <[email protected]>
  • Loading branch information
marcelrv authored and andan67 committed Nov 5, 2022
1 parent 1148caf commit 660d20e
Show file tree
Hide file tree
Showing 7 changed files with 4,272 additions and 5 deletions.
324 changes: 321 additions & 3 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 @@ -66,10 +66,13 @@ public enum MiIoDevices {
DREAME_VACUUM_MC1808("dreame.vacuum.mc1808", "Mi Robot Vacuum Mop 1C STYTJ01ZHM", THING_TYPE_BASIC),
DREAME_VACUUM_P2008("dreame.vacuum.p2008", "Dreame Robot Vacuum-Mop F9", THING_TYPE_BASIC),
DREAME_VACUUM_P2009("dreame.vacuum.p2009", "Dreame Robot Vacuum D9 ", THING_TYPE_BASIC),
DREAME_VACUUM_P2027("dreame.vacuum.p2027", "Dreame Bot W10", THING_TYPE_BASIC),
DREAME_VACUUM_P2028("dreame.vacuum.p2028", "Dreame Bot Z10 Pro", THING_TYPE_BASIC),
DREAME_VACUUM_P2036("dreame.vacuum.p2036", "Trouver Robot LDS Vacuum-Mop Finder", THING_TYPE_BASIC),
DREAME_VACUUM_P2041O("dreame.vacuum.p2041o", "Mi Robot Vacuum-Mop 2 Pro+", THING_TYPE_BASIC),
DREAME_VACUUM_P2156O("dreame.vacuum.p2156o", "MOVA Z500 Robot Vacuum and Mop Cleaner", THING_TYPE_BASIC),
DREAME_VACUUM_P2157("dreame.vacuum.p2157", "MOVA L600 Robot Vacuum and Mop Cleaner", THING_TYPE_BASIC),
DREAME_VACUUM_P2259("dreame.vacuum.p2259", "Dreame Bot D9 Max", THING_TYPE_BASIC),
HUAYI_LIGHT_ARI013("huayi.light.ari013", "HUIZUO ARIES For Bedroom", THING_TYPE_BASIC),
HUAYI_LIGHT_ARIES("huayi.light.aries", "HUIZUO ARIES For Living Room", THING_TYPE_BASIC),
HUAYI_LIGHT_FANWY("huayi.light.fanwy", "HUIZUO Fan Light", THING_TYPE_BASIC),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public class MiotParser {
private static final String BASEURL = "https://miot-spec.org/miot-spec-v2/";
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
private static final boolean SKIP_SIID_1 = true;
private static final boolean INCLUDE_MANUAL_ACTIONS_COMMENT = false;

private String model;
private @Nullable String urn;
Expand Down Expand Up @@ -328,7 +329,7 @@ public MiIoBasicDevice getDevice(JsonElement urnData) throws MiotParseException
}
deviceMapping.setChannels(miIoBasicChannels);
device.setDevice(deviceMapping);
if (actionText.length() > 35) {
if (actionText.length() > 35 && INCLUDE_MANUAL_ACTIONS_COMMENT) {
deviceMapping.setReadmeComment(
"Identified " + actionText.toString().replace("Manual", "manual").replace("\r\n", "<br />")
+ "Please test and feedback if they are working so they can be linked to a channel.");
Expand Down
Loading

0 comments on commit 660d20e

Please sign in to comment.