MQTT Switch not showing (esp8266)

hello,
I have a nodemcu esp8266 connected through a mqtt broker with the mosquitto plugin for home assistant.
The esp is connected to the broker, and my home assistant is as well:
New client connected from 192.168.0.205 as ESP_LED1.0 (c1, k15, u’ *n03xp3rt4tt4ll’).
and
New client connected from 172.30.32.1 as 14874a80-b4ef-7425-74c5-e20h9e2245e3 (c1, k60, u’homeassistant’).

My configuration.yaml contains this:

# RGB:
light:
  - platform: mqtt_json
    name: ESPRGBLED1
    state_topic: "home/rgb1"
    command_topic: "home/rgb1/set"
    brightness: true
    rgb: true
    effect: true
    effect_list: [colorfade_slow, colorfade_fast, flash]
    optimistic: false
    qos: 0

But when i go to the homepage, there is no light to be seen that’s called ESPRGBLED1.
If someone knows how to fix this ?
Thanks a lot in advance.

should be platform: mqtt

json not needed

this is my yaml:

  • platform: mqtt
    name: “Kitchen Light”
    state_topic: “stat/kitchen2/POWER”
    command_topic: “cmnd/kitchen2/POWER”
    availability_topic: “tele/kitchen2/LWT”
    payload_on: “ON”
    payload_off: “OFF”
    qos: 0
1 Like

Wow! Okay, that worked :smiley:

Thank you!