Vacuum
The vacuum integration is how Home Assistant controls robot vacuums.
Home Assistant can set a vacuum to a fan speed, but not step it to the next one. A button that gives the robot more suction, one press at a time, has to be a template. Spook adds that step.
Actions
Spook adds two actions for vacuums. You find them wherever you add an action, marked with a 👻.
Next and previous fan speed
Steps a vacuum to its next fan speed, like from quiet to balanced, or back to the previous one. Only through the speeds you pick, if you like.
Think of a button by the kitchen door that gives the robot more suction after dinner, one press at a time, and a second button for less. Without this, each button is a template that finds the speed in the list and takes its neighbour, minding the ends. This action does the step for you, the same way it does for the fan of a thermostat.
How to use it
- Open the automation or script that should do this, and select Add action.
- Search for next fan speed, and select Vacuum: Next fan speed 👻. Or search for previous fan speed, and select Vacuum: Previous fan speed 👻, to go the other way.
- Under Targets, choose the vacuums.
- Leave Cycle on to go round at the end. Turn it off to stop there.
- Leave Options empty to step through all of the fan speeds it has, or fill in the ones to step through, in order, like
quiet,balancedandturbo. - Select Save.
Just want to see it work? Try next fan speed or try previous fan speed opens it in your Home Assistant, ready to run once.
| Action properties | |
|---|---|
| Action | Vacuum: Next fan speed 👻 |
| Action name | vacuum.next_fan_speed |
| Action targets | Yes, vacuum entities with fan speeds |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action properties | |
|---|---|
| Action | Vacuum: Previous fan speed 👻 |
| Action name | vacuum.previous_fan_speed |
| Action targets | Yes, vacuum entities with fan speeds |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
cycle | boolean | No | true |
options | list | No | All of the vacuum's own |
Both work the same way:
- Without Options, they step through the vacuum's own list, in the order the vacuum gives it.
- With Options, they step through those, in the order you give them, and skip the rest.
- A vacuum at a fan speed that is not in that list, or that does not say, goes to the first one with next, and to the last one with previous.
- With Cycle on, the last goes round to the first, and the first back to the last. With Cycle off, a vacuum at the end stays there, and is sent nothing.
- A vacuum already where the step would take it, like one with a single fan speed in the list, is sent nothing.
- Spook sets the new fan speed the way
vacuum.set_fan_speeddoes. That action hands any speed to the vacuum, listed or not. Spook only steps to a speed the vacuum lists.
More suction from a button, one speed up per press, stopping at turbo rather than going round to quiet:
triggers:
- trigger: state
entity_id: input_button.more_suction
not_from: unavailable
actions:
- action: vacuum.next_fan_speed
target:
entity_id: vacuum.robot
data:
cycle: false
options:
- quiet
- balanced
- turbo
And less, stopping at quiet:
action: vacuum.previous_fan_speed
target:
entity_id: vacuum.robot
data:
cycle: false
options:
- quiet
- balanced
- turbo
- A vacuum without fan speeds cannot be targeted. Named outright, it is refused with an error. Picked up through an area, a device, a floor or a label, it is passed over, and the others are stepped. One that says it has fan speeds but lists none is sent nothing, also when named outright, and also with Options.
- Every option has to be one the vacuum has. One it does not have refuses the whole call with an error that names it, and no vacuum in the call is changed, not even the ones that have it.
vacuum.set_fan_speedwould send it anyway; this check is the only one. - An option given twice is refused: at that speed, there is no telling which of the two the vacuum is at.
- The names of the fan speeds differ from one integration to the next. Look them up in the
fan_speed_listattribute of the vacuum.
Missing something here?
An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.
