Control LED with MQTT - ESP8266

Hello,

I’m new to Home Assistant and have a question regarding ESP8266 controlled by HA running on my NAS,… I can’t get it to work…

What I did so far is:

  • Installation of Home Assistant
  • Mosquito broker.
  • I have a test setup like described like here
    (The only thing I left out in the .ino file are username and password for mqtt.)
  • Uploaded the .ino file and it is connected to MQTT with success.
  • I changed the configuration.yaml file with the given code
  • After restart I added a switch, but it tells me that it has no unique ID !!

I know that probable here I do something wrong, but cannot find it out myself.

Maybe someone can give me a hint in the rught direction what I should do or where I should look for…

Thank you in advanced