simple-wyze-vac
simple-wyze-vac copied to clipboard
Home Assistant Custom Component for Wyze Vacuum
Simple Wyze Vacuum for Home Assistant
- Simple Wyze Vacuum for Home Assistant
- General
- Prerequisites
- Installation
- Supported Features
- Polling
- Misc
- TOTP
- Implementing vacuum-card
- Adding map to vacuum card
- Shoutouts
General
Simple implementation of the Wyze Vacuum right into Home Assistant.
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:
- To update the state of the device, you can do a
vacuum.send_commandwith commandupdatewhich will update the state of the vacuum. See vacuum-card example below for an implementation. - Enable Polling
Prerequisites
- Home Assistant 😅
- HACS Installed in Home Assistant
- Wyze Account (either with 2FA disabled or TOTP authentication setup when integrating Simple Wyze Vac. Note: This is NOT the same thing as the 6 digit code you get from your Authenticator app. Please see TOTP section)
Installation
- On Home Assistant go to HACS -> Integration
- Click menu on the top right
- Click on custom repositories
- Add https://github.com/romedtino/simple-wyze-vac as an Integration
- Install/Add simple-wyze-vac
- Restart Home Assistant
- Navigate to
Configuration - Navigate to
Devices & Services - Click
ADD INTEGRATIONon the bottom right - Select
Simple Wyze Vac - Enter your
usernameandpassword
If it all worked out, you should now have Wyze vacuum entity(ies)
Supported Features
- TOTP (Note: This is NOT the same thing as the 6 digit code you get from your Authenticator app. Please see TOTP section)
- Start
- Stop / Pause
- Return to Base
- Filter lifespan information (Main filter, main brush and side brush)
- Camera entity to show last vacuum map
- Room names as toggleable switches (For area cleaning)
- Room names as vacuum attributes
- Optional Polling
- Sweep Rooms as a service using
simple_wyze_vac.sweep_roomsorvacuum.send_commandwith commandsweep_auto- 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.theovac rooms: - switch.swv_kitchen - switch.swv_entryway - Using
sweep_auto- 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_autowill do an area cleaning of the Living Room.
- Using built-in service and choosing the switch entities/rooms you want to do a sweep

service: vacuum.send_command
data:
command: sweep_auto
target:
entity_id: vacuum.theovac
- Manually designate area cleaning (Must use serivce call) Example:

service: vacuum.send_command
data:
command: sweep_rooms
params:
rooms:
- Hallway
- Kitchen
target:
entity_id: vacuum.theovac
- Fan Speed control -
quietstandardstrongExample:
service: vacuum.set_fan_speed
data:
fan_speed: quiet
target:
entity_id: vacuum.your_vac
- Battery Level
- Update status - 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.theovac
- Refresh Login Token - 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.theovac
Polling
To enable polling
- Navigate to the Simple Wyze Vac
Devices & Servicespage underConfiguration - Select
Configure
- Check
Enable pollingand provide the interval. The interval value is inHH:MM:SSformat. For example00:01:00would poll every 1 minute.
Misc
- Location is currently not supported but it is considered "supported" by HA so the button doesn't crash the component when using vacuum-card defaults if you use it.
Implementing vacuum-card
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
Adding map to vacuum card
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
TOTP
wyze_sdk implemented support for using TOTP (Time-Based One-Time Password). Specifically, mintotp which works great!
How to Setup TOTP
- If you already have 2FA setup on your Wyze account you will have to reapply it. If you already have Simple Wyze Vac integrated, you will have to remove it and readd it.
- To remove it, navigate to the Wyze app and go -
Accounts -> Security -> Two-Factor Authenticationand remove verification - Back in
Accounts -> Security -> Two-Factor Authentication, select Verification by Authenticator app. - Read the instructions from Wyze BUT make sure to copy and KEEP the value in step 3. This is your Base32 SECRET used to generate TOTP.
- Go ahead and setup your TOTP on the Authenticator of your choosing.
- Re-add
Simple Wyze VacunderAdd Integrationof Home Assistant. - Enter your
username,passwordand for TOTP, copy the Base32 SECRET you got from the Wyze app Submitand you should now be authenticated with 2FA enabled!
Shoutouts
- @shauntarves/wyze-sdk - This would not be possible without this awesomesauce
- aarongodfrey - Helped figuring out what in the world I am doing
- Samuel - More info on how custom components work
- markdown-toc - For markdown TOC generator