Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
8987762
Merge pull request #189 from Tasshack/master
Tasshack Aug 24, 2023
8f0f9aa
v2.0.0
Aug 24, 2023
3dab2b4
#190
Aug 24, 2023
fcf2974
v2.0.0b2
Aug 25, 2023
7c8cb49
v2.0.0b3
Aug 26, 2023
25d3d5c
v2.0.0b4
Aug 26, 2023
7d22e1c
v2.0.0b4
Aug 26, 2023
2e77797
v2.0.0b5
Aug 27, 2023
011aadf
v2.0.0b5
Aug 27, 2023
51c6be1
Portuguese translation v2.0.0
WZYProjects Sep 11, 2023
d8744b1
Merge pull request #215 from WZYProjects/dev
Tasshack Sep 17, 2023
6980baf
v2.0.0b6
Sep 19, 2023
9260aea
Merged from master
Oct 12, 2023
ed994bc
Updated and added DE translations
Nov 2, 2023
bac051a
Merge pull request #274 from 13robin37/dev
Tasshack Nov 3, 2023
9653866
v2.0.0b7
Nov 20, 2023
ea1669c
v2.0.0b8
Nov 20, 2023
a772a27
v2.0.0b8
Nov 20, 2023
94e00a4
Create hu.json
v1k70rk4 Nov 21, 2023
05d50d8
Merge pull request #306 from v1k70rk4/dev
Tasshack Nov 22, 2023
e3c1f0d
v2.0.0b9
Nov 22, 2023
c0d4642
Ru localization improvements
gentslava Nov 30, 2023
2a20251
v2.0.0b10
Dec 15, 2023
df549c2
v2.0.0b11
Dec 16, 2023
3712cab
Merge branch 'dev' into dev
gentslava Dec 17, 2023
52e26ad
Merge pull request #326 from gentslava/dev
Tasshack Dec 17, 2023
5bfc82f
Added a Dutch translation file. Added PyCharm .idea direcotry to igno…
Jan 6, 2024
06875eb
Merge pull request #360 from yodax/dutch-translation
Tasshack Jan 6, 2024
0b8aa3d
v2.0.0b12
Feb 13, 2024
ef6cebc
v2.0.0b12
Feb 13, 2024
bea7bfa
v2.0.0b12
Feb 13, 2024
227544a
v2.0.0b12
Feb 13, 2024
09fdaa9
v2.0.0b12
Feb 13, 2024
0ce8be1
Update README.md
Tasshack Feb 14, 2024
4580d06
v2.0.0b12
Feb 14, 2024
3771ca3
v2.0.0b13
Apr 1, 2024
fb5be5c
Add github action to codespell master on push and PRs
yarikoptic Feb 19, 2024
5c9e5eb
Add rudimentary codespell config
yarikoptic Feb 19, 2024
c6f3345
Add custom codespell skips
yarikoptic Feb 19, 2024
b4e6ffd
[DATALAD RUNCMD] run codespell throughout fixing typos automagically
yarikoptic Apr 1, 2024
3c7a077
Merge pull request #471 from yarikoptic/enh-codespell
Tasshack Apr 2, 2024
38206a8
v2.0.0b14
Apr 13, 2024
355897d
v2.0.0b14
Apr 13, 2024
0bd7a75
Fixed German translation
swiftbird07 Apr 13, 2024
ce33e9c
Merge pull request #488 from swiftbird07/patch-1
Tasshack Apr 14, 2024
a28476e
Second version of the spanish translation, updating to the one in dev…
AdriVillaB Apr 26, 2024
c8bb4b0
Merge pull request #509 from AdriVillaB/dev
Tasshack Apr 27, 2024
33624d5
v2.0.0b15
Jun 10, 2024
8230782
Merge branch 'dev' of https://github.com/Tasshack/dreame-vacuum into dev
Jun 10, 2024
0f5660a
v2.0.0b15
Jun 10, 2024
8c2d39c
v2.0.0b15
Jun 10, 2024
86b830c
fix: #498 Support for new Xiaomi Robot Vacuum X20+
Jun 11, 2024
bf0c613
v2.0.0b16
Aug 9, 2024
bfcd510
v2.0.0b16
Aug 9, 2024
3064149
v2.0.0b16
Aug 9, 2024
afdad7e
v2.0.0b16
Aug 9, 2024
a342e0b
New translation (Catalan)
dtalens Aug 22, 2024
0df7ccd
Merge pull request #681 from dtalens/dev
Tasshack Sep 5, 2024
ece7c2c
New translation (Taiwanese)
xangin Sep 25, 2024
a306ce2
Update zh-Hant.json
xangin Sep 28, 2024
cc2779a
Merge pull request #730 from xangin/patch-1
Tasshack Oct 10, 2024
d5608cd
Update hu.json
taczirjak Oct 16, 2024
a641df9
Merge pull request #764 from taczirjak/patch-2
Tasshack Oct 18, 2024
e2fad76
Create zh-Hans.json
maodun96 Nov 14, 2024
a6b58bb
v2.0.0b16
taifunk Nov 25, 2024
272458b
Merge pull request #789 from maodun96/patch-1
Tasshack Nov 26, 2024
6496e15
Update FUNDING.yml
Tasshack Dec 6, 2024
89fa9b0
Added Slovenian translations
suskozaver Jan 2, 2025
39957ef
Slovenian translation
suskozaver Jan 2, 2025
6262003
Slovenian translations
suskozaver Jan 3, 2025
b575dd3
Slovenian translation
suskozaver Jan 3, 2025
b8def03
Merge branch 'dev' into Slovenian-translation
Tasshack Feb 23, 2025
bc1dc55
Update .gitignore
Tasshack Feb 23, 2025
9c0a59d
Checking if history.neglected_segments is a dict
rubentsirunyan Feb 28, 2025
c538849
Fix translation key for fan speed error in German locale
Mar 4, 2025
c6befd0
Merge pull request #872 from kagithd/dev
Tasshack Mar 8, 2025
b0a8106
Merge pull request #844 from suskozaver/Slovenian-translation
Tasshack Mar 8, 2025
1c4436f
Merge pull request #805 from taifunk/master
Tasshack Mar 8, 2025
ce14e68
Merge pull request #867 from rubentsirunyan/dev
Tasshack Mar 8, 2025
39dbbc7
Update and rename hacs.yaml to validate.yaml
Tasshack Mar 8, 2025
63541d9
Update validate.yaml
Tasshack Mar 8, 2025
27caaa3
Merge branch 'master' into dev
Mar 8, 2025
8115c11
v2.0.0b17
Mar 9, 2025
579f04d
v2.0.0b17
Mar 9, 2025
7e16c00
v2.0.0b17
Mar 9, 2025
e2a9007
Corrected fr.json
ThibaultDenoual Mar 13, 2025
752b6db
Update ru translations
Drafteed Mar 27, 2025
16841e4
tweaks
Drafteed Mar 28, 2025
0472e2d
fix: Crash caused when device.status.deodorizer_life is None
GuiGu0101 Apr 1, 2025
061a955
Add Romanian
ematt Apr 14, 2025
96c57e3
Merge pull request #904 from ThibaultDenoual/dev
Tasshack Apr 21, 2025
3497ed0
Merge pull request #933 from Drafteed/translations-ru-fixes
Tasshack Apr 21, 2025
0ebb461
Merge pull request #963 from ematt/ro_translation
Tasshack Apr 21, 2025
7b14da4
Merge pull request #941 from GuiGu0101/dev
Tasshack Apr 21, 2025
23c5dbb
Add Czech translation
Kan55 May 8, 2025
80cdfad
fixed JSON formating
Kan55 May 8, 2025
a30a2a9
Merge pull request #999 from Kan55/czech_translation
Tasshack May 28, 2025
2278337
v2.0.0b18
Jun 4, 2025
f9cd421
v2.0.0b18
Jun 4, 2025
bff166e
v2.0.0b18
Jun 4, 2025
09dca07
v2.0.0b18
Jun 4, 2025
36c6344
v2.0.0b18
Jun 4, 2025
8100830
Update README.md
Jun 4, 2025
a65bcf2
v2.0.0b18
Jun 4, 2025
2b91b99
Merge branch 'master' into dev
Jun 6, 2025
d824ed5
v2.0.0b19
Jun 6, 2025
51f1543
Update Chinese translations
LOVE2CMOL Jun 27, 2025
241a41d
Merge pull request #1074 from LOVE2CMOL/translation_zhHans
Tasshack Jul 20, 2025
4f1aa1f
Added Korean translation
yoosh0203 Aug 7, 2025
17c9a74
Merge pull request #1126 from shyoo0000/dev
Tasshack Aug 7, 2025
6e7b83b
add as_dict for some type, avoid serialization error when using ltss
detecti1 Aug 12, 2025
b743eb4
Merge pull request #1135 from detecti1/fix/data-json-serialization
Tasshack Aug 14, 2025
34c83e8
v2.0.0b20
Aug 15, 2025
ea7f137
v2.0.0b20
Aug 15, 2025
f438b85
v2.0.0a21 with Trouver Support
Oct 2, 2025
6735dcc
Improve Dutch translations in nl.json
Oct 7, 2025
20b9d7c
fixup! v2.0.0b20
evensure Oct 19, 2025
79a6510
fixup! v2.0.0b20
evensure Oct 19, 2025
31754ec
Update verification path in verify_code method
mailforMike Oct 22, 2025
8d78524
Create el.json
Chreece Oct 24, 2025
aeac2e0
Update el.json
Chreece Oct 24, 2025
2dc103d
Merge pull request #1192 from Tasshack/trouver_support
Tasshack Dec 2, 2025
cc70e47
Merge pull request #1225 from mailforMike/dev
Tasshack Dec 2, 2025
7a41f14
Merge pull request #1220 from evensure/dev
Tasshack Dec 2, 2025
2232bb0
Merge pull request #1200 from KevinKerkhofs/improve-nl-translation
Tasshack Dec 2, 2025
265f2ac
Merge pull request #1227 from Chreece/dev
Tasshack Dec 2, 2025
acb0679
Fix German translation conflict
Dec 3, 2025
bb807ba
Fix German translation conflict
Dec 3, 2025
b675e53
v2.0.0b21
Dec 4, 2025
7e7f972
Fixes of migrate integration to has entity name
Drafteed Dec 9, 2025
7b4f7f6
Merge pull request #1330 from Drafteed/migrate-entity-naming2
Tasshack Feb 4, 2026
b14dc9d
v2.0.0b21
Feb 4, 2026
0e45b2f
v2.0.0b21
Feb 4, 2026
d0d4dba
v2.0.0b22
Feb 4, 2026
978a8cb
Merge branch 'dev' of https://github.com/Tasshack/dreame-vacuum into dev
Feb 4, 2026
bbe520e
v2.0.0b22
Feb 4, 2026
74c5188
v2.0.0b22
Feb 5, 2026
6a7465f
v2.0.0b22
Feb 8, 2026
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
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git,.codespellrc,translations,resources.py
check-hidden = true
# ignore-regex =
ignore-words-list = hass,aline,laF,visibile
Binary file added .github/icons/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/icons/kofi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/icons/paypal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within .codespellrc
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
*.pyproj.user
*.sln
/env
*.zip
*.zip
.idea
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
## Contributing
To submit your changes please fork this repository and open a pull request.
To submit your changes please fork this repository and open a pull request to dev branch.
191 changes: 103 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Version](https://img.shields.io/github/manifest-json/v/Tasshack/dreame-vacuum/master?filename=custom_components%2Fdreame_vacuum%2Fmanifest.json&color=slateblue&label=Version&style=for-the-badge)](https://github.com/Tasshack/dreame-vacuum/releases)
[![Version](https://img.shields.io/github/manifest-json/v/Tasshack/dreame-vacuum/dev?filename=custom_components%2Fdreame_vacuum%2Fmanifest.json&color=slateblue&label=Version&style=for-the-badge)](https://github.com/Tasshack/dreame-vacuum/releases)
![Downloads](https://img.shields.io/github/downloads/Tasshack/dreame-vacuum/total?label=Downloads&style=for-the-badge)
![Stars](https://img.shields.io/github/stars/Tasshack/dreame-vacuum?label=Stars&color=darkgoldenrod&style=for-the-badge)
[![HACS](https://img.shields.io/badge/HACS-Default-orange.svg?logo=HomeAssistantCommunityStore&logoColor=white&style=for-the-badge)](https://github.com/hacs/integration)
Expand All @@ -18,110 +18,127 @@ Complete app replacement with Home Assistant for Dreame robot vacuums.

## Features

- [Auto generated device entities](https://github.com/Tasshack/dreame-vacuum/blob/master/docs/entities.md)
- [Live and multi floor map support](https://github.com/Tasshack/dreame-vacuum/blob/master/docs/map.md)
- [Customized room cleaning entities](https://github.com/Tasshack/dreame-vacuum/blob/master/docs/room_entities.md)
- [Services for device and map with examples](https://github.com/Tasshack/dreame-vacuum/blob/master/docs/services.md)
- [Persistent notifications and error reporting](https://github.com/Tasshack/dreame-vacuum/blob/master/docs/notifications.md)
- [Events for automations](https://github.com/Tasshack/dreame-vacuum/blob/master/docs/events.md)
- [Valetudo map card support](#with-valetudo-map-card)

## Supported Devices
- **Dreame**
- `dreame.vacuum.p2008` *(F9)*
- `dreame.vacuum.p2009` *(D9)*
- `dreame.vacuum.p2259` *(D9 Max)*
- `dreame.vacuum.p2187` *(D9 Pro)*
- `dreame.vacuum.r2205` *(D10 Plus)*
- `dreame.vacuum.p2029` *(L10 Pro)*
- `dreame.vacuum.p2028a` *(L10 Plus)*
- `dreame.vacuum.r2228o` *(L10s Ultra)*
- `dreame.vacuum.r2215o` *(L10s Pro)*
- `dreame.vacuum.r2216o` *(L10s Pro)*
- `dreame.vacuum.p2028` *(Z10 Pro)*
- `dreame.vacuum.p2027` *(W10)*
- `dreame.vacuum.r2104` *(W10 Pro)*
- `dreame.vacuum.r2251o` *(W10s)*
- `dreame.vacuum.r2232a` *(W10s Pro)*
- `dreame.vacuum.r2228` *(S10)*
- `dreame.vacuum.r2211o` *(S10+)*
- `dreame.vacuum.r2233` *(S10 Pro)*
- `dreame.vacuum.r2247` *(S10 Pro Plus)*
- `dreame.vacuum.r2246` *(S10 Plus)*
- `dreame.vacuum.r2215` *(X10)*
- `dreame.vacuum.r2235` *(X10 Ultra)*
- **Mijia**
- `dreame.vacuum.p2036` *(Trouver LDS Finder)*
- `dreame.vacuum.p2150o` *(Vacuum-Mop)*
- `dreame.vacuum.p2150a` *(Vacuum-Mop 2 Ultra)*
- `dreame.vacuum.p2150b` *(Vacuum-Mop 2 Ultra Set)*
- `dreame.vacuum.p2114o` *(Self-Cleaning Robot Vacuum-Mop)*
- `dreame.vacuum.p2149o` *(Self-Cleaning Robot Vacuum-Mop Pro)*
- `dreame.vacuum.r2254` *(1S)*
- `dreame.vacuum.r2209` *(X10)*
- `dreame.vacuum.p2114a` *(X10+)*
- `dreame.vacuum.p2041` *(1T)*
- `dreame.vacuum.p2140a` *(2C)*
- `dreame.vacuum.p2140` *(2C)*
- `dreame.vacuum.p2140q` *(Mi Robot Vacuum-Mop 2)*
- `dreame.vacuum.p2140p` *(Mi Robot Vacuum-Mop 2)*
- `dreame.vacuum.p2140o` *(Mi Robot Vacuum-Mop 2)*
- `dreame.vacuum.p2148o` *(Mi Robot Vacuum Mop Ultra Slim)*
- `dreame.vacuum.p2041o` *(Mi Robot Vacuum-Mop 2 Pro+)*
- **MOVA**
- `dreame.vacuum.p2157` *(L600)*
- `dreame.vacuum.p2156o` *(MOVA Z500)*
- [Supported devices](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/supported_devices.md)
- [Auto generated device entities](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/entities.md)
- [Live and multi floor map support](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/map.md)
- [Map obstacle photos](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/map.md#obstacle-photos)
- [Cleaning and cruising history maps](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/map.md#cleaning-and-cruising-history-maps)
- [Cloud and local map backup/recovery](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/map.md#backup-and-recovery)
- [Saved WiFi coverage maps](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/map.md#wifi-map)
- [Customized room cleaning entities](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/room_entities.md)
- [Services for device and map with examples](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/services.md)
- [Persistent notifications and error reporting](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/notifications.md)
- [Events for automations](https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/events.md)
- Dreamehome account support
- Movahome account support


## Installation

### Manually
#### Manually

```sh
wget -O - https://raw.githubusercontent.com/Tasshack/dreame-vacuum/master/install | bash -
```bash
wget -O - https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/install | bash -
```


### Via [HACS](https://hacs.xyz/)
#### Via [HACS](https://hacs.xyz/)
<a href="https://my.home-assistant.io/redirect/hacs_repository/?owner=Tasshack&repository=dreame-vacuum&category=integration" target="_blank"><img src="https://my.home-assistant.io/badges/hacs_repository.svg" alt="Open your Home Assistant instance and open a repository inside the Home Assistant Community Store." /></a>


## Configuration

<a href="https://my.home-assistant.io/redirect/config_flow_start/?domain=dreame_vacuum" target="_blank"><img src="https://my.home-assistant.io/badges/config_flow_start.svg" alt="Open your Home Assistant instance and start setting up a new integration." /></a>
- Select configuration type:

<img src="https://raw.githubusercontent.com/Tasshack/dreame-vacuum/master/docs/media/config_flow.png" width="550px">

<a href="https://github.com/Tasshack/dreame-vacuum/blob/master/docs/map.md" target="_blank">About map feature</a>
- **Mi Home Account**: TODO
- **Dreamehome Account**: TODO
- **Local**: TODO

- Enter required credentials according to the selected configuration type.
> Please make sure that the devices are at same subnet for both configuration types. <a href="https://python-miio.readthedocs.io/en/latest/troubleshooting.html#discover-devices-across-subnets" target="_blank">python-miio article about this issue.</a>
> Please make sure that the devices are at same subnet for `Mi Home account` and `Local` configuration types. <a href="https://python-miio.readthedocs.io/en/latest/troubleshooting.html#discover-devices-across-subnets" target="_blank">python-miio article about this issue.</a>
- Set your device name and integration settings:

<img src="https://raw.githubusercontent.com/Tasshack/dreame-vacuum/master/docs/media/config_flow_settings.png" width="350px">
TODO

<a href="https://github.com/Tasshack/dreame-vacuum/blob/master/docs/notifications.md" target="_blank">About notifications feature</a><br><a href="https://github.com/Tasshack/dreame-vacuum/blob/master/docs/map.md#color-schemes" target="_blank">About map color schemes</a>
<a href="https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/notifications.md" target="_blank">About notifications feature</a><br><a href="https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/map.md#color-schemes" target="_blank">About map color schemes</a>
- Navigate to device page for disabling or enabling entities that you want to use.

<a href="https://github.com/Tasshack/dreame-vacuum/blob/master/docs/entities.md" target="_blank">About entities</a>

## How to Use
<a href="https://github.com/Tasshack/dreame-vacuum/blob/dev/docs/entities.md" target="_blank">About entities</a>


## How To Use
Integration is compatible with all available Lovelace vacuum cards but if you want to use zone cleaning feature you can prefer the Xiaomi Vacuum Card.

#### With [Xiaomi Vacuum Map Card](https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card)
#### With Dreame Vacuum Card

*Work in progress... <a href="https://github.com/Tasshack/dreame-vacuum/issues/466" target="_blank">#466</a>*


#### With [Xiaomi Vacuum Map Card](https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card)
> Template for room and zone cleaning.
<a href="https://my.home-assistant.io/redirect/developer_template/" target="_blank"><img src="https://my.home-assistant.io/badges/developer_template.svg" alt="Open your Home Assistant instance and show your template developer tools." /></a>
```yaml
{# ----------------- PROVIDE YOUR OWN ENTITY IDS HERE ----------------- #}
{% set camera_entity = "camera." %}
{% set vacuum_entity = "vacuum." %}
{# ------------------- DO NOT CHANGE ANYTHING BELOW ------------------- #}
{% set attributes = states[camera_entity].attributes %}

type: custom:xiaomi-vacuum-map-card
entity: # Your vacuum entity
vacuum_platform: default
entity: {{ vacuum_entity }}
map_source:
camera: # Map Entity
camera: {{ camera_entity }}
calibration_source:
camera: true
vacuum_platform: Tasshack/dreame-vacuum
map_modes:
- template: vacuum_clean_zone
max_selections: 10
repeats_type: EXTERNAL
max_repeats: 3
service_call_schema:
service: dreame_vacuum.vacuum_clean_zone
service_data:
entity_id: '[[entity_id]]'
zone: '[[selection]]'
repeats: '[[repeats]]'
- template: vacuum_clean_segment
repeats_type: EXTERNAL
max_repeats: 3
service_call_schema:
service: dreame_vacuum.vacuum_clean_segment
service_data:
entity_id: '[[entity_id]]'
segments: '[[selection]]'
repeats: '[[repeats]]'
predefined_selections:
{%- for room_id in attributes.rooms | default([]) %}
{%- set room = attributes.rooms[room_id] %}
- id: {{room_id}}
outline:
- - {{room["x0"]}}
- {{room["y0"]}}
- - {{room["x0"]}}
- {{room["y1"]}}
- - {{room["x1"]}}
- {{room["y1"]}}
- - {{room["x1"]}}
- {{room["y0"]}}
{%- endfor %}
- name: Clean Spot
icon: mdi:map-marker-plus
max_repeats: 3
selection_type: MANUAL_POINT
repeats_type: EXTERNAL
service_call_schema:
service: dreame_vacuum.vacuum_clean_spot
service_data:
entity_id: '[[entity_id]]'
points: '[[selection]]'
repeats: '[[repeats]]'
```

> Open card editor, click "Generate rooms config" button, check (adjust if needed) your config using yaml editor and save changes.
<img src="https://user-images.githubusercontent.com/6118709/189792603-c5ad2089-7405-4d1b-850d-77af8f170618.png">

#### With [Vacuum Card](https://github.com/denysdovhan/vacuum-card)

```yaml
Expand All @@ -145,7 +162,7 @@ stats:
subtitle: Sensors
cleaning:
- attribute: cleaned_area
unit:
unit: m2
subtitle: Cleaned area
- attribute: cleaning_time
unit: min
Expand Down Expand Up @@ -245,35 +262,33 @@ attributes:

```

#### With Dreame Vacuum Card

*Coming Soon*

## To Do

- Cleaning history map support
- Map recovery support
- Integrated custom lovelace map card
- Shortcut editing
- Schedule editing
- AI Obstacle image support
- Custom lovelace card for map editing
- Furniture editing
- DnD editing
- Live camera streaming
- Backend translations


## Contributing
Integrations is currently only available on English language and if want you use it on our language it would be very helpful to you to translate files on *translations* folder and share with us.

To submit your changes please fork this repository and open a pull request.
To submit your changes please fork `dev` branch of this repository and open a pull request.

## Thanks To

- [xiaomi_vacuum](https://github.com/pooyashahidi/xiaomi_vacuum) by [@pooyashahidi](https://github.com/pooyashahidi)
- [Xiaomi MIoT for Home Assistant](https://github.com/ha0y/xiaomi_miot_raw) by [@ha0y](https://github.com/ha0y)
- [Xiaomi Cloud Map Extractor](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor) by [@PiotrMachowski](https://github.com/PiotrMachowski)

- Dreame cloud authentication by [@kuudori](https://github.com/kuudori)
- Mova cloud help by [@r1si](https://github.com/r1si)


## Do not forget to support the project!

<a href="https://ko-fi.com/tasshack"><img width="300" src="https://raw.githubusercontent.com/Tasshack/dreame-vacuum/refs/heads/dev/.github/icons/kofi.png"/></a>

<a href="https://paypal.me/tasshackK"><img width="300" src="https://raw.githubusercontent.com/Tasshack/dreame-vacuum/refs/heads/dev/.github/icons/paypal.png"></a>

<a href="https://github.com/sponsors/Tasshack"><img width="300" src="https://raw.githubusercontent.com/Tasshack/dreame-vacuum/refs/heads/dev/.github/icons/github.png"></a>
<a href="https://github.com/sponsors/Tasshack"><img width="300" src="https://raw.githubusercontent.com/Tasshack/dreame-vacuum/refs/heads/dev/.github/icons/github.png"></a>
29 changes: 23 additions & 6 deletions custom_components/dreame_vacuum/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"""The Dreame Vacuum component."""

from __future__ import annotations
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from .const import DOMAIN
from .coordinator import DreameVacuumDataUpdateCoordinator
from homeassistant.components.frontend import DATA_EXTRA_MODULE_URL
import warnings
from pathlib import Path
from .const import DOMAIN

# Suppress python-miio FutureWarning on Python 3.13
warnings.filterwarnings(
Expand All @@ -17,6 +19,8 @@
# Suppress RuntimeWarning overflow encountered in scalar add
warnings.filterwarnings("ignore", category=RuntimeWarning)

from .coordinator import DreameVacuumDataUpdateCoordinator

PLATFORMS = (
Platform.VACUUM,
Platform.SENSOR,
Expand All @@ -26,6 +30,7 @@
Platform.NUMBER,
Platform.SELECT,
Platform.CAMERA,
Platform.TIME,
)


Expand All @@ -36,20 +41,32 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator

entry.async_on_unload(entry.add_update_listener(update_listener))
# Register frontend
# frontend_js = f"/{DOMAIN}/frontend.js"
# if DATA_EXTRA_MODULE_URL not in hass.data:
# hass.data[DATA_EXTRA_MODULE_URL] = set()
# if frontend_js not in (
# hass.data[DATA_EXTRA_MODULE_URL].urls
# if hasattr(hass.data[DATA_EXTRA_MODULE_URL], "urls")
# else hass.data[DATA_EXTRA_MODULE_URL]
# ):
# hass.data[DATA_EXTRA_MODULE_URL].add(frontend_js)
# hass.http.register_static_path(frontend_js, str(Path(Path(__file__).parent / "frontend.js")), True)

# Set up all platforms for this device/entry.
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

entry.async_on_unload(entry.add_update_listener(update_listener))
return True


async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unload Dreame Vacuum config entry."""
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
coordinator: DreameVacuumDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
coordinator.device.listen(None)
coordinator.device.disconnect()
del coordinator.device
coordinator._device.listen(None)
coordinator._device.disconnect()
del coordinator._device
coordinator._device = None
del hass.data[DOMAIN][entry.entry_id]

Expand Down
Loading