Start a mqtt command from a momentary switch on the front panel

I want to start a "light show sequence on my anavi light controller.
As I understant I have to publish the corresponding topy with the right value.
This part is on the automation.yaml file.
But for the front panel part I have some trouble.
I created a boolean in the configuration.yaml:

name: light_show
initial: off
icon: mdi:stairs

Is that right ?
the name of the boolean will be input_boolean.start_light_show_1 on the front panel ? is that right.

From the automation part,
I wrote:

déclencher le light show

  • id: “light_show”
    alias: “Light show start”
    • platform: state
      entitiy_id: binary_sensor.start_light_show_1
      from: “off”
      to: ‘on’
      • service: mqtt.publish
        topic: “cmnd/b0704d58c57d3b4bbacadaf645505c4/color”
        payload: “effect: rainbow1”

But I have an error message:

Invalid config for [automation]: [entitiy_id] is an invalid option for [automation]. Check: automation->trigger->0->entitiy_id. (See /config/configuration.yaml, line 13). Please check the docs at

Line 13 is the call of the automation script.

Many thanks for your help because I don’t find a document to help me for the begining…
Best regards and thanks for the community !

It’s due to a spelling error.





Hi Taras, thanks a lot for the spelling error !
I corrected, but I have the same error…
Best regards

How can it be the same error if you corrected it?

The original error message identified the spelling error:

[entitiy_id] is an invalid option for [automation]

What does the current error message state?

Also, please format your code because, in its current unformatted form, it’s difficult to check it for possible indenting errors.

To format your code, select it and then click the </> icon in the menu.

Sorry, I just find the second error.
It was a miss aligned typo in automation.yaml

Do you use a tool for debuging typo error ?? or just our eyes ?

It’s very difficult for other people to detect indentation/alignment errors if you post your code unformatted.

I use Microsoft Visual Studio Code for editing YAML files. It supports many kinds of plug-ins including a YAML checker.