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