For the Sonoff Basic’s the problem could be that the Tasmota firmware has evolved over time so a config that worked a while back might not work the same now.
Here is a config for the only Tasmota Sonoff Basic I still have left. All the rest of my Sonoff’s berside that one Basic and now the iFan03 have all been switched to ESPHome firmware:
- platform: mqtt
name: "Tree"
state_topic: "stat/tree/POWER"
command_topic: "cmnd/tree/POWER"
availability_topic: "tele/tree/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: false
I think the 1 on the end of the topic is used or not depending on which module configuration you set the device to use. Some devices have more than one relay and will require 1, 2, 3, etc added. Some only have one relay. Some are fans that run more than one relay at a time for fan speed control so they don’t use “power” they use “FanSpeed” with the desired fanspeed in the topic payload.
The first thing I recommend if you don’t already have it is to install a mqtt sniffer program. I use MQTTFx and MQTTExplorer. Both are really useful and can be used for different functions.
Generally I use MQTTFx for watching general MQTT topic traffic. If you watch that traffic you can see what messages are traveling around in your MQTT network. And that can help you figure out what the exact topics are that you need to use in your configs.
But on to the problems…
As far as the theme colors my fan controls can be themed individually for different backgrounds. You can look at the repository for config options and examples (https://github.com/finity69x2/fan-control-entity-row).
For the light you would just create another mqtt light and use that to control the light. Here is my config for the light:
light:
- platform: mqtt
name: "iFan03-1 Light"
command_topic: "cmnd/iFan03-1/power1"
state_topic: "stat/iFan03-1/POWER1"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: false
Then just put the resulting switch on your frontend for the toggle to control the light.
Can you please post the most recent config for your iFan03 again? I just want to make sure that I’m looking at the most recent config.
Also as suggestred above, install MQTTFx , connect it to your broker and subcribe to all the topics (use # in the subcribe section). Then watch for the topics and payloads that pop up in the right hand window when you operate the iFan03 from the Tasmota web console.
You won’t see any of the command topics pop up because all of that is done outside of your broker but you will see all of the status messages.
Then after that try to operate the ifan03 from the HA frontend using my fan control row. you should see the same status messages as before in response to the commands but this time you should also see the commands sent from HA to your broker to try to control the ifan03. Pay particular attention to the “off” button command since that is the one you said isn’t working.
Once you’ve done that if it doesn’t lead you to a solution then please post back with the requested information.
We’ll get this figured out.