denysdovhan / vacuum-card

Vacuum cleaner card for Home Assistant Lovelace UI
https://denysdovhan.com/smart-home
MIT License
924 stars 530 forks source link

"sequence item 0: expected str instance, Optional found" when trying to call service #253

Closed girkers closed 2 years ago

girkers commented 3 years ago

Before submitting a bug

[X] I updated to the latest version available [X] I cleared the cache of my browser

Describe the bug

When I push the button for the action it fails with the error:

Log: Logger: homeassistant.components.websocket_api.http.connection Source: helpers/config_validation.py:134 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 8:01:33 PM (17 occurrences) Last logged: 8:18:40 PM [140584461459712] sequence item 0: expected str instance, Optional found

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

Card Config (action only) actions:

When I call the service directly it works fine, here is the code:

service: litterrobot.reset_waste_drawer target: device_id: badcf1bf8a867ee28a2c70a841b504c9

Versions:

denysdovhan commented 2 years ago

This is the problem with your service or service data, not with the card. Doublecheck your config.