Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[miio] add channel for is_locating #10036

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.miio/README.base.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ Number statusFanPow "Fan Power [%1.0f%%]" <signal> (gVacStat) {channel="mi
Number statusClean "In Cleaning Status [%1.0f]" <switch> (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]" <status> (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"}
Expand Down Expand Up @@ -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 #) |


Expand Down
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4438,6 +4438,7 @@ Number statusFanPow "Fan Power [%1.0f%%]" <signal> (gVacStat) {channel="mi
Number statusClean "In Cleaning Status [%1.0f]" <switch> (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]" <status> (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"}
Expand Down Expand Up @@ -4474,6 +4475,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 #) |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@
<label>Mop Forbidden</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="is_locating">
<item-type>Switch</item-type>
<label>Robot Locating</label>
<state readOnly="true"/>
</channel-type>

<!-- Consumables channels -->
<channel-type id="main_brush_percent">
Expand Down