Simple implementation of the Wyze Vacuum right into Home Assistant. I have only tested this against the official firmware version - 1.6.202 If you run into issues against a different firmware please be extra descriptive of the problem when filing an issue.
NOTE
By default, this integration DOES NOT automatically update your vacuum entity. This is due to Wyze applying a rate limit on integrations. For more details you can read the reddit thread here. However, there is an option to enable polling with a configuration change. This leaves this integration with two options to address this issue:
vacuum.send_command
with command update
which will update the state of the vacuum. See vacuum-card example below for an implementation.key_id
and an api_key
Configuration
Devices & Services
ADD INTEGRATION
on the bottom rightSimple Wyze Vac
username
, password
, key_id
and api_key
(optionaly, the TOTP value see TOTP section)If it all worked out, you should now have Wyze vacuum entity(ies)
Simple Wyze Vac has a few available service commands.
There are three options to sweep rooms - simple_wyze_vac.sweep_rooms
, sweep_auto
or sweep_rooms
. See details below.
Using built-in service and choosing the switch entities/rooms you want to do a sweep
or in YAML
service: simple_wyze_vac.sweep_rooms
data:
entity_id: vacuum.YOUR_VACUUM_NAME_HERE
rooms:
- switch.swv_kitchen
- switch.swv_entryway
Automatically run area cleaning
based on the rooms (switch entities provided by Simple Wyze Vac) that are ON
. For example, in the attached screenshot, invoking a sweep_auto
will do an area cleaning of the Living Room.
service: vacuum.send_command
data:
command: sweep_auto
target:
entity_id: vacuum.YOUR_VACUUM_NAME_HERE
(Must use serivce call) Example:
service: vacuum.send_command
data:
command: sweep_rooms
params:
rooms:
- Hallway
- Kitchen
target:
entity_id: vacuum.YOUR_VACUUM_NAME_HERE
Options are quiet
standard
strong
Example:
service: vacuum.set_fan_speed
data:
fan_speed: quiet
target:
entity_id: vacuum.YOUR_VACUUM_NAME_HERE
Since the integration no longer polls, you can query the status of the vacuum by sending a custom command update
service: vacuum.send_command
data:
command: update
target:
entity_id: vacuum.YOUR_VACUUM_NAME_HERE
You can also refresh the login token if it has been awhile since you queried status and your login token has expired
service: vacuum.send_command
data:
command: refresh_token
target:
entity_id: vacuum.YOUR_VACUUM_NAME_HERE
With multi-room support, it is possible to use send a service command to switch rooms
Example:
service: vacuum.send_command
data:
command: set_current_map
params:
map: YOUR MAP NAME HERE
target:
entity_id: vacuum.YOUR_VACUUM_NAME_HERE
To enable polling
Devices & Services
page under Configuration
Configure
Enable polling
and provide the interval. The interval value is in HH:MM:SS
format. For example 00:01:00
would poll every 1 minute.There's a lovely Lovelace vacuum-card here in which you can implement your vacuum like so:
Here is my YAML configuration of the card
type: custom:vacuum-card
entity: vacuum.theovac
image: default
show_toolbar: true
show_status: true
show_name: true
compact_view: false
stats:
default:
- attribute: filter
unit: hours
subtitle: Filter
- attribute: side_brush
unit: hours
subtitle: Side brush
- attribute: main_brush
unit: hours
subtitle: Main brush
shortcuts:
- name: Clean living room
service: script.vacuum_room_clean
icon: mdi:sofa
service_data:
rooms:
- Living Room
- name: Update
service: script.vacuum_update_state
icon: mdi:update
and the contents of the scripts it invokes
alias: Vacuum Room Clean
variables:
rooms:
- Living Room
sequence:
- service: vacuum.send_command
data:
command: sweep_rooms
params:
rooms: ' {{ rooms }} '
target:
entity_id: vacuum.theovac
mode: single
alias: Vacuum Update State
sequence:
- service: vacuum.send_command
data:
command: update
target:
entity_id: vacuum.theovac
mode: single
There is support for at showing the last sweep map. With the exposed camera entity, in your vacuum-card (if you're using it) you can add camera.{vacuum_name}_camera
e.g.
map: camera.wyzevac_camera
which should then show the last sweep map
TIP - Wrap your vacuum card in a 'conditional' card and use the vacuum state of 'docked' to test if it is docked and undocked. This way, you can still have the vacuum logo and not the map when the vacuum is not running. Another option is to create a helper input_boolean
and use that instead to toggle between showing the map and showing the vacuum like so:
type: conditional
conditions:
- entity: input_boolean.map_toggle
state: 'off'
card:
type: custom:vacuum-card
entity: vacuum.theovac
image: default
show_toolbar: true
show_status: true
show_name: true
compact_view: false
stats:
default:
- attribute: filter
unit: hours
subtitle: Filter
- attribute: side_brush
unit: hours
subtitle: Side Brush
- attribute: main_brush
unit: hours
subtitle: Main Brush
shortcuts:
- name: Toggle Map
service: input_boolean.toggle
service_data:
entity_id: input_boolean.map_toggle
icon: mdi:map
view_layout:
position: sidebar
view_layout:
position: sidebar
wyze_sdk
implemented support for using TOTP (Time-Based One-Time Password). Specifically, mintotp which works great!
Accounts -> Security -> Two-Factor Authentication
and remove verificationAccounts -> Security -> Two-Factor Authentication
, select Verification by Authenticator app.Simple Wyze Vac
under Add Integration
of Home Assistant.username
, password
, key_id
, api_key
and for TOTP, copy the Base32 SECRET you got from the Wyze appSubmit
and you should now be authenticated with 2FA enabled!