Skip to content

Home Assistant Custom Component for Wyze Vacuum

Notifications You must be signed in to change notification settings

Scags104/simple-wyze-vac

 
 

Repository files navigation

Simple Wyze Vacuum for Home Assistant

NOTE As of 8/20/2021

Wyze has recently implemented a rate limit on accessing their private APIs. Due to this change, I cannot recommend installing this integration in HA until this all gets sorted out. I might resort to adding a "send_command" that maybe you can use to query Wyze servers. This way it's more event based and it will be on you to make sure you don't hit the rate limits. I have disabled polling on this integration.

To update the state of the device, you can do a vacuum.send_command with command update which will update the state of the vacuum. See vacuum-card example for an implementation.

General

Simple implementation of the Wyze Vacuum right into Home Assistant.

Prerequisites

  • Home Assistant 😅
  • HACS Installed in Home Assistant
  • Wyze Account without 2FA - Tip: Create a new account that you share just the vacuum with that doesn't have 2FA enabled.

Installation

  1. On Home Assistant go to HACS -> Integration
  2. Click menu on the top right
  3. Click on custom repositories
  4. Add https://github.com/romedtino/simple-wyze-vac as an Integration
  5. Edit your configuration.yaml and add
simple_wyze_vac:
  username: your_wyze_email@email.com
  password: your_wyze_password
  1. Verify your configuration file is valid
  2. Restart Home Assistant

If it all worked out, you should now have Wyze vacuum entity(ies)

Supported Features

  • Start
  • Stop / Pause
  • Return to Base
  • Room Clean (Must use serivce call) Example: image
service: vacuum.send_command
data:
  command: sweep_rooms
  params:
    rooms:
      - Hallway
      - Kitchen
target:
  entity_id: vacuum.theovac
  • Fan Speed control - quiet standard strong Example: image
service: vacuum.set_fan_speed
data:
  fan_speed: quiet
target:
  entity_id: vacuum.your_vac
  • Battery Level

Misc

  • Location is not supported but it is considered "supported" by HA so the button doesn't crash the component when using vacuum-card if you use it.

Implementing vacuum-card

There's a lovely Lovelace vacuum-card here in which you can implement your vacuum like so: image

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
actions:
  - 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

TODO / Maybe in the Future

  • In theory everything from wyze-sdk should be possible?

Shoutouts

About

Home Assistant Custom Component for Wyze Vacuum

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%