Martin Jerry MJ-SD01 + Tasmota = no brightness control in HA

Hello all,
With tuya on the fritz, I finally got around to flashing a bunch of modules with Tasmota. I flashed a Martin Jerry SD01 with Tasmota 8.3.1. Once integrated into Home Assistant, the module first appeared as a switch - it would appear as a light with Tuya but I was able to make it appear as a light with setoption30. But, the module has no brightness slider in home assistant now, just on/off toggle. Clearly, I am missing something…

Many thanks.

Sounds like it’s a PWM Dimmer, check out https://tasmota.github.io/docs/PWM-dimmer-switch/ :slight_smile:

Hi - thanks for the link. I had read through that (3 times). In the Tasmota front-end (ie web interface at LAN IP ADDRESS for module), there is a dimmer bar that works without issue. The buttons on the dimmer work without issue as well. For now, I am not interested in programing long-press commands etc. The problem is that initially HA sees the dimmer as a basic toggle on/off switch and auto-discovers a switch entity. Using setoption30, HA will auto-discover the module as a light entity, but still restrict the entity to on/off, no brightness control.

Hm, I see. You might have to do some manual configuration, check out https://www.youtube.com/watch?v=fyxxk2NrKG8

And… here is the answer: https://github.com/digiblur/Tasmota/wiki/Dimmer-Devices

Turned off auto-discovery for that module, set up a light.yaml, dropped in the code, changed the topic from “TuyaTest” to my own and, well, “Bob’s your uncle.”

Not sure if it applies, but I found a flaw in my dual channel Tasmota dimmer; HA would not detect manual operation. I had to change

    state_topic: "stat/TuyaDimTest/POWER"

to

    state_topic: "stat/TuyaDimTest/RESULT"
    value_template: '{{ value_json["POWER"] }}'
1 Like

@a2gin2

this is handled under the newest tasmota dev releases
it now properly handles pwm devices
i am on 8.3.1.7 and have auto turned on
and HASS sees it as a dimmer

2 Likes

Sure is. I FINALLY just got around to updating devices etc. and all is running smoothly now with Auto-Discovery.

Do I have to flash it to Tasmota in order to be able to use Brightness, or can I do that using the Tuya Integration with the switch as it came out of the box?

You do not have to flash it with tasmota, however, if you use Tuya integration, it will still run in the cloud (witch might cause unwanted delays).

Tasmota allows you to run everything locally on HA without any dependency of 3rd party (cloud-)solutions

I understand, but the question was about the brightness. How do I control the brightness in a script ore code-red, if I don’t see it as a property?

I wouldn’t know with Tuya (as all my units are flashed with Tasmota).

But once SetOption19 is set to 1 on the tasmota unit, HA should automatically detect the unit:
image