Mqtt milight esp8266

Hello, I have hassio running on intel nuc, mosquitto addon which runs well. I have esp8266 running milight hub with firmware from https://github.com/sidoh/esp8266_milight_hub/releases 1.70 dev 6. I use mqtt _json but I am unable to get the bulb discovered and added as light.Left_Lamp. Here is my light config

light:

  • platform: mqtt_json
    name: Left_Lamp
    command_topic: milight_gw/0xxxx/rgbw/3/set
    state_topic: milight_gw/state/0xxxx/rgbw/3
    brightness: true
    rgb: true
    white_value: true
    effect: true
    effect_list: [colorfade_slow, colorfade_fast, flash]
    optimistic: false
    qos: 0
    retain: true

I am using milight_gw on esp8266 as detailed on sidoh github

mqtt_topic_pattern
milight_gw/:device_id/:device_type/:group_id

mqtt_update_topic_pattern
milight_gw/update/:device_id/:device_type/:group_id

mqtt_state_topic_pattern
milight_gw/state/:device_id/:device_type/:group_id

mosquitto_sub on HA shows the light being turned on and off from milight/esp8266 hub (logged into milighthub page) but no device created on HA.

How can I get the devices created in HA either by discovery or manually ? Thanks.

As soon as you put this entry in your config and restarted HA, this element should appear in HA.

Did you check if you see ligh.left_lamp in the State tab?

Yes, I did and there is no such entity. I have greenwave lights, hue lights which did turn up and create themselves but not this milight bulbs.

You must have a problem in your config then, do you see any error in log after restarting? If you create it manually, it should appear.

Thanks. I figured it out after your comment “You must have a problem in your config”. I still had light: line in after moving the lights section to light directory from the main config.yaml. I took the light: line 1 out and the entities were created.