diff --git a/bundles/org.openhab.binding.miio/README.base.md b/bundles/org.openhab.binding.miio/README.base.md index 12bfc36b52bfd..88306fd08807c 100644 --- a/bundles/org.openhab.binding.miio/README.base.md +++ b/bundles/org.openhab.binding.miio/README.base.md @@ -218,6 +218,7 @@ Number statusFanPow "Fan Power [%1.0f%%]" (gVacStat) {channel="mi Number statusClean "In Cleaning Status [%1.0f]" (gVacStat) {channel="miio:vacuum:034F0E45:status#in_cleaning" } Switch statusDND "DND Activated" (gVacStat) {channel="miio:vacuum:034F0E45:status#dnd_enabled" } Number statusStatus "Status [%1.0f]" (gVacStat) {channel="miio:vacuum:034F0E45:status#state"} +Switch isLocating "Locating" (gVacStat) {channel="miio:vacuum:034F0E45:status#is_locating" } Number consumableMain "Main Brush [%1.0f]" (gVacCons) {channel="miio:vacuum:034F0E45:consumables#main_brush_time"} Number consumableSide "Side Brush [%1.0f]" (gVacCons) {channel="miio:vacuum:034F0E45:consumables#side_brush_time"} @@ -254,6 +255,7 @@ Additionally depending on the capabilities of your robot vacuum other channels m | Number | status#water_box_mode | Water Box Mode | | Switch | status#water_box_carriage_status | Water Box Carriage Status | | Switch | status#mop_forbidden_enable | Mop Forbidden | +| Switch | status#is_locating | Robot is locating | | Number | actions#segment | Room Clean (enter room #) | diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index 7bf5b5f7772d0..8f702fad0e20c 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -4437,6 +4437,7 @@ Number statusFanPow "Fan Power [%1.0f%%]" (gVacStat) {channel="mi Number statusClean "In Cleaning Status [%1.0f]" (gVacStat) {channel="miio:vacuum:034F0E45:status#in_cleaning" } Switch statusDND "DND Activated" (gVacStat) {channel="miio:vacuum:034F0E45:status#dnd_enabled" } Number statusStatus "Status [%1.0f]" (gVacStat) {channel="miio:vacuum:034F0E45:status#state"} +Switch isLocating "Locating" (gVacStat) {channel="miio:vacuum:034F0E45:status#is_locating" } Number consumableMain "Main Brush [%1.0f]" (gVacCons) {channel="miio:vacuum:034F0E45:consumables#main_brush_time"} Number consumableSide "Side Brush [%1.0f]" (gVacCons) {channel="miio:vacuum:034F0E45:consumables#side_brush_time"} @@ -4473,6 +4474,7 @@ Additionally depending on the capabilities of your robot vacuum other channels m | Number | status#water_box_mode | Water Box Mode | | Switch | status#water_box_carriage_status | Water Box Carriage Status | | Switch | status#mop_forbidden_enable | Mop Forbidden | +| Switch | status#is_locating | Robot is locating | | Number | actions#segment | Room Clean (enter room #) | diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java index e4f1ca5722617..3b3eba803aa5d 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoVacuumHandler.java @@ -344,6 +344,9 @@ private boolean updateVacuumStatus(JsonObject statusData) { if (deviceCapabilities.containsKey(RobotCababilities.MOP_FORBIDDEN)) { safeUpdateState(RobotCababilities.MOP_FORBIDDEN.getChannel(), statusInfo.getMopForbiddenEnable()); } + if (deviceCapabilities.containsKey(RobotCababilities.LOCATING)) { + safeUpdateState(RobotCababilities.LOCATING.getChannel(), statusInfo.getIsLocating()); + } return true; } diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/RobotCababilities.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/RobotCababilities.java index 80a01b28ad577..2d8d5dc339a62 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/RobotCababilities.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/RobotCababilities.java @@ -29,6 +29,7 @@ public enum RobotCababilities { WATERBOX_CARRIAGE("water_box_carriage_status", "status#water_box_carriage_status", "miio:water_box_carriage_status"), MOP_FORBIDDEN("mop_forbidden_enable", "status#mop_forbidden_enable", "miio:mop_forbidden_enable"), + LOCATING("is_locating", "status#is_locating", "miio:is_locating"), SEGMENT_CLEAN("", "actions#segment", "miio:segment"); private final String statusFieldName; diff --git a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/vacuumThing.xml b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/vacuumThing.xml index 7e813654f04bf..caee93a44ecf4 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/vacuumThing.xml +++ b/bundles/org.openhab.binding.miio/src/main/resources/OH-INF/thing/vacuumThing.xml @@ -179,6 +179,11 @@ + + Switch + + +