No Color picker when adding mqtt light

Hi,

I’m just starting with Home Assistant so I’m probably missing some basics.

The final setup should be an ESP8266 driving an RGB LED light strip and communicating with Home Assistant via MQTT (Mosquitto broker). I was able to establish basic MQTT communication (can turn on the LED on the ESP8266 from Home Assistant and Home Assistant is getting the messages from the ESP8266) but for the last hours I have tried to add a RGB light to the configuration.yaml file but I never get the Color Picker / Wheel. I get the brightness and on/off. I tried a lot of different configurations but this is what I have right now:

 light:
   - platform: mqtt
     schema: json
     command_topic: "home/rgb1/set"
     state_topic: "home/rgb1"
     brightness: true
     rgb: true

Which gives me this:
image

Am I doing something wrong or missing the bigger picture? Based on documentation and entries here this should have worked and give me the color wheel/picker?

Thanks a lot,
Martin

Turn the light on and look again. No point having the colour picker visible when the light is off.

Thanks!

I’ll give that a try. Just wondering why the brightness bar is there then? Because zero brightness == off?

Because you can turn the light on with the brightness slider.

Hi @tom_l,

Okay, that makes sense.

As said I’m pretty new to this. Could you point me in the right direction?

I can see that my ESP is connecting to home assistant. The logfile of the MQTT broker shows:

1598221092: New connection from 192.xxx.xxx.xxx on port 1883.
[INFO] found tmpMQTT on local database
1598221093: New client connected from 192.xxx.xxx.xxx as ESP8266Client-87f1 (p2, c1, k15, u'tmpMQTT').

Based on the output of the ESP the config message is being sent:

Attempting MQTT connection...connected
Success sending message

From this code:

  if (client.publish("homeassistant/light/kitchen/config", jsonMessageBuffer) == true) {
    Serial.println("Success sending message");
  } else {
    Serial.println("Error sending message");
  }

When I subscribe manually to the homeassistant/light/kitchen/config channel then I can see, that the message is received:
image

Is my understanding incorrect, that this should create a light entity? Discovery is enabled in the configuration.yaml file:

mqtt:
  broker: 192.xxx.xxx.xxx
  port: 1883
  username: tmpMQTT
  password: tmpMQTT
  discovery: true
  discovery_prefix: homeassistant

Or do I need to manually add a light entry in the configuration file, and if yes, how would I “link” this so that the discovery message will be connected to the this entry. My apologies, I probably use the complete wrong terminology for all this.