Skip to content

Commit

Permalink
Merge pull request #650 from Tasshack/dev
Browse files Browse the repository at this point in the history
vacuum_goto and vacuum_follow_path modes for Tasshack/dreame-vacuum
  • Loading branch information
PiotrMachowski authored Feb 27, 2024
2 parents a79eca3 + fa2ec5d commit 1393ea7
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 1 deletion.
90 changes: 90 additions & 0 deletions docs/templates/tasshackDreameVacuum.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,93 @@ This platform can be used to control vacuums connected to Home Assistant using D
https://user-images.githubusercontent.com/6118709/141666923-965679e9-25fb-44cd-be08-fc63e5c85ce0.mp4

</details>


* ### Going to a specified point (`vacuum_goto`)

Uses a pair of coordinates for vacuum to get to a user-specified point.

Used service: `dreame_vacuum.vacuum_goto`

<details>
<summary>Example configuration</summary>

```yaml
map_modes:
- template: vacuum_goto
```

</details>
<details>
<summary>Example video</summary>

https://user-images.githubusercontent.com/6118709/141666921-2f3d66da-6ffc-492a-8439-625da97651bd.mp4

</details>

* ### Going to a predefined point (`vacuum_goto_predefined`)

Uses a pair of coordinates for vacuum to go to a point that has been defined in the configuration. Requires `predefined_selections` to be provided.

[Getting coordinates](/docs/templates/setup.md#getting-coordinates)

Used service: `dreame_vacuum.vacuum_goto`

<details>
<summary>Example configuration</summary>

```yaml
map_modes:
- template: vacuum_goto_predefined
predefined_selections:
- position: [ 2800, 2036 ]
label:
text: "Emptying"
x: 2800
y: 2803
offset_y: 35
icon:
name: "mdi:broom"
x: 2800
y: 2803
- position: [ 3214, 2628 ]
label:
text: "Sofa"
x: 3214
y: 2628
offset_y: 35
icon:
name: "mdi:sofa"
x: 3214
y: 2628
```

</details>
<details>
<summary>Example video</summary>

https://user-images.githubusercontent.com/6118709/141666923-965679e9-25fb-44cd-be08-fc63e5c85ce0.mp4

</details>

* ### Following a specified path (`vacuum_follow_path`)

Uses a list of points to make a vacuum follow a user-defined path.

Used service: `dreame_vacuum.vacuum_follow_path`

<details>
<summary>Example configuration</summary>

```yaml
map_modes:
- template: vacuum_follow_path
```

</details>
<details>
<summary>Example video</summary>

https://user-images.githubusercontent.com/6118709/141666931-48d1717f-96d0-461d-84f4-788c071f3a78.mp4

</details>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"map_modes": {
"default_templates": [
"vacuum_clean_zone",
"vacuum_clean_point"
"vacuum_clean_point",
"vacuum_goto"
],
"templates": {
"vacuum_clean_segment": {
Expand Down Expand Up @@ -91,6 +92,59 @@
"entity_id": "[[entity_id]]"
}
}
},
"vacuum_goto": {
"name": "map_mode.vacuum_goto",
"icon": "mdi:map-marker-radius",
"selection_type": "MANUAL_POINT",
"coordinates_rounding": true,
"coordinates_to_meters_divider": 1000,
"repeats_type": "NONE",
"max_repeats": 0,
"max_selections": 1,
"service_call_schema": {
"service": "dreame_vacuum.vacuum_goto",
"service_data": {
"x": "[[point_x]]",
"y": "[[point_y]]",
"entity_id": "[[entity_id]]"
}
}
},
"vacuum_goto_predefined": {
"name": "map_mode.vacuum_goto_predefined",
"icon": "mdi:map-marker-multiple",
"selection_type": "PREDEFINED_POINT",
"coordinates_rounding": true,
"coordinates_to_meters_divider": 1000,
"repeats_type": "NONE",
"max_repeats": 0,
"max_selections": 1,
"service_call_schema": {
"service": "dreame_vacuum.vacuum_goto",
"service_data": {
"x": "[[point_x]]",
"y": "[[point_y]]",
"entity_id": "[[entity_id]]"
}
}
},
"vacuum_follow_path": {
"name": "map_mode.vacuum_follow_path",
"icon": "mdi:map-marker-path",
"selection_type": "MANUAL_PATH",
"coordinates_rounding": true,
"coordinates_to_meters_divider": 1000,
"repeats_type": "NONE",
"max_repeats": 0,
"max_selections": 20,
"service_call_schema": {
"service": "dreame_vacuum.vacuum_follow_path",
"service_data": {
"points": "[[selection]]",
"entity_id": "[[entity_id]]"
}
}
}
}
},
Expand Down

0 comments on commit 1393ea7

Please sign in to comment.