#i wrote it precisely as documentation

1 messages · Page 1 of 1 (latest)

hoary nebula
#

No you didn't 😉

#
command_line:
  - switch:
      name: Kitchen Light
``` ![abkneonyes](https://cdn.discordapp.com/emojis/488882553890013184.webp?size=128 "abkneonyes")
#
command_line:
  - switch:
    name: PC
``` ![abkneonno](https://cdn.discordapp.com/emojis/488882553328107529.webp?size=128 "abkneonno")
silver whale
#

i do not get it

hoary nebula
#

Look at the two

#

The top one is correct - where does name line up to switch?

#

The bottom one isn't - where does name line up to switch?

dry lindenBOT
#

YAML is the mark up language used by Home Assistant, consistent indenting (two spaces per level) is key. Here is a primer, and this explains multi-line templates. For validating YAML see YAML Lint.

silver whale
#

oh now it works

#

me not like this

hoary nebula
#

YAML is all about indenting

silver whale
#

ok, how can i add this to a switch?

#

i cannot find such entity

hoary nebula
#

Did you restart HA to load that YAML?

silver whale
#

yes

dry lindenBOT
#

If you're having problems with your updates to your configuration:

silver whale
#

man this thing is picky

hoary nebula
#

Yes

dry lindenBOT
hoary nebula
#

Always run that command when you touch YAML

silver whale
#

i had double command_line in there i am an amateur

hoary nebula
#

At least you're learning how to troubleshoot