You have a separate switch.yaml ? Then it will be different again.
Youâll need to remove the switch: at the top and remove the space before the hyphen in front of platform.
Then line everything up under the âpâ in platform
I think the problem that you have a problem is with the mqtt topic, you had defined the topic in you sonoff as sonoff2 (see the image that you post), and in your configuration file you have all the topics has sonoff01. The topics in the configuration file must be always like:
state_topic: âstat/sonoff/POWERâ
command_topic: âcmnd/sonoff/POWERâ
availability_topic: âtele/sonoff/LWTâ
The only thing that you can change in the strings between ââ is the word sonoff, that is between / /. And you change for the name that you put on the topic option, on the sonoff configuration page. For your case and assuming that you still have the configuration as in the image that you post you must put: sonoff2. The rest you CANâT change.
If you have several sonoff you change the topic for each one, and must be different. And use the same topic name in the switch configuration.
Hey.
I have been struggling to manually(without using Auto-discovery) configure my Sonoff Basic, but after carefully studying GitHub wiki(wiki), i finally made it. Iâm using Sonoff-Tasmota 6.4.1 and Home Assistant 0.85.1, so my configuration looks like: