Trying to make a button to start my Roomba with one click - call service vacuum.start failing - SOLVED

First off I’m running HassOS and I’m very new to this. I’ve only had HA for 3 days now so go easy on me please!

I integrated my Roomba just now and decided I wanted a button to quickly start it from my dashboard with one click rather than having to open the entity box first.

Seemed pretty straight forward to set up, I chose to call the service vacuum.start

type: button
tap_action:
  action: call-service
  service: vacuum.start
entity: vacuum.dustin

(yes my Roomba’s name is Dustin)

But when I try to click the button I get the following error:

Logger: homeassistant.components.websocket_api.http.connection
Source: helpers/config_validation.py:142
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:41:04 AM (10 occurrences)
Last logged: 12:59:55 AM

[2860463416] sequence item 0: expected str instance, Optional found
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 136, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1409, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in __call__
    return self._exec((Schema(val) for val in self.validators), v)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 337, in _exec
    v = func(v)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 142, in validate
    raise vol.Invalid("must contain at least one of {}.".format(", ".join(keys)))
TypeError: sequence item 0: expected str instance, Optional found

Has anyone been able to successfully do this or have any insight into what that error means? I don’t know much about coding, learning as I go. Any help is much appreciated.


I realized after posting this that I had just configured the button code wrong. This is what you want it to look like:

type: button
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.dustin

Hi there! Welcome to HA!
Did you specify the entity from the robot vacuum?
Could you share your card configuration?

Ah I totally forgot to include that. Added!

Omg I figure this out 2 seconds after I posted it. For anyone else that’s in my boat the configuration you want is

type: button
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.dustin
5 Likes

Awesome this helped - is there a way to do a send back home for Roomba? I tried vacuum.stop but that only stops the vaccum but doesnt send it home…

Try using the return_to_base service. HA Vacuum Integration

Thank you, but unfortunately does not seem to work for the irobot Roomba