Need some help with config of the light component when with multiple lights. I understand that I need two different topics for the mqtt but cant figure out how to set up the config for lights when having more than one light. Do I use the “devices” to separate and if so - how?
Yep it’s as simple as @PianSom says, go into the Mqtt config in the second Sonoff’s web UI, change the topic field which from your code will currently say just ”sonoff” to for example ”sonoff2”.
Then in your HA config copy and paste the code you have for the first one and in the second one change name: to whatever you want to call it and then change