romedtino / simple-wyze-vac

Home Assistant Custom Component for Wyze Vacuum
48 stars 8 forks source link

sweep_auto not an available service? #35

Closed seanemclean closed 1 year ago

seanemclean commented 2 years ago

First, this integration is awesome - thank you! I just recently updated it and redid my setup via the UI, all devices and entities added as expected. I'm trying to setup an evening clean using the sweep_auto command in Node Red, but the only service call available for simple wyze vacuum is 'sweep rooms' - this ignores any constraints from the room switches.

Is there a step or yaml configuration I'm missing to enable sweep auto?

romedtino commented 2 years ago

Hi, I'm not a Node Red User but I think you have two options to go about it. If you want to use what the room buttons are already set to which is your question, then you can do

Node: call_service Domain: vacuum Service: send_command Entity: Your vacuum entity name Data (Expression): {"command":"sweep_auto"}

Or you can use sweep_auto and pass it in a list of rooms (as entity names) you want to clean

Node: call_service Domain: simple_wyze_vac Service: sweep_rooms Entity: Your vacuum entity name Data (Expression): {"rooms":["switch.swv_living_room", "switch.swv_bedroom"]}

The former would require you to have the buttons set to specific rooms every evening to make sure it only goes to those specific rooms. The latter would always choose the rooms you list in the Data expression.

Hopefully that helps!~

seanemclean commented 2 years ago

This was SUPER helpful, thank you so much! Just an FYI for you/others, the data for the first scenario should be sweep_auto instead of send_auto. I'm able to use both of these for my needs.

One more quick question: Is there a return to home command I can send to have it to return to the dock? (eg, if I arrive home while it's still cleaning)

romedtino commented 2 years ago

There should be a service already for that built right into home assistant service: vacuum.return_to_base

romedtino commented 1 year ago

Seems to be complete.