corbanmailloux / esp-mqtt-rgb-led

MQTT RGB LEDs Using JSON for Home Assistant
MIT License
270 stars 74 forks source link

mqtt light (2nd entry) not showing on home assistant #32

Closed AAli77 closed 6 years ago

AAli77 commented 6 years ago

light:

Can you/anyone please assistant me what I am doing wrong.

I had compile the code no error, home assistant load perfectly but LED Switch is showing only for mqtt_json_light_2.

thanks

AA

corbanmailloux commented 6 years ago

@AAli77 For future reference, when you post your code on Github you can wrap it in three backtick (`) characters to make Github format it as code and keep the original formatting. You can also use the code button in the comment editor (< >). For example:

CODE

To your question: Here's a sample of multiple mqtt_json lights from my own configuration.

If I'm reading your configuration correctly, it looks like you are only listing the platform once and you have both lights in the same list item. Note how in my configuration the - platform: mqtt_json line is repeated at the beginning of each light. That lets Home Assistant know you are creating a second light.

AAli77 commented 6 years ago

Thank you Sir, I will try your code. And also thanks a lot for your quick response