Extra keys not allowed @ data['playload'] Automation

Hi
I´m trying to make work this automation:

- id: '1602557246182'
  alias: Cerrar Cortina Luis
  description: ''
  trigger:
  - platform: mqtt
    topic: LV-Automation/cuarto/luis/Cover
    payload: CLOSE
  condition: []
  action:
  - service: mqtt.publish
    data:
      topic: LV-Automation/cuarto/luis/Cover/state
      playload: closing
  - service: mqtt.publish
    data:
      playload: 'OFF'
      topic: cmnd/LV-Automation/cuarto/luis/Cover/Set/POWER1
  - service: mqtt.publish
    data:
      playload: 'ON'
      topic: cmnd/LV-Automation/cuarto/luis/Cover/Set/POWER2
  - service: mqtt.publish
    data:
      topic: LV-Automation/cuarto/luis/Cover/state
      playload: closed
  mode: single

But if fails with the error:

While executing automation automation.cerrar_cortina_luis
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 426, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 985, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 239, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 247, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 454, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1289, in async_call
    processed_data = handler.schema(service_data)
  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 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['playload']

Some idea?

All of your publish actions have “playload” instead of “payload”.

2 Likes

Hehe… thanks may be sleep is a good idea.