Only 1 switch showing on Dash in HA

Hi “newbe” question again.

I tried to put both my switches on the HA dash but i can only get one to work
when i put code for 2 there is error or they not shown

This is my config

switch:

  • platform: tplink
    host: 192.168.0.144
    name: TvBelysning

switch:

  • platform: tplink
    host: 192.168.0.114
    name: JulBelysning

how should i format them to have both shown on the default dash ?
Thanks!

First, when posting code, use the preformatted text option. Highlight your code then press the button shown in the image below. That will preserve all your spacing so we can read it correctly and rule out formatting as being an issue.

When you have more than one of a device entry and you are using a single configuration file, you need to increment the devices like so:

device:
  name: device one name
  options: whatevers

device 2:
  name: device two name
  options: whatevers

The second device is always device 2: and subsequent devices are numbered after that; device 3: , device 4: etc.

EDIT: @turboc answered while I was taking to long to format (lol) and his solution will also work.

worked like a boss, thanks for lighting speed answer!!

1 Like

Awesome, glad I could help!

1 Like