SONOFF BN-SZ01 with SONOFF-TASMOTA firmware and MQTT enabled

Hi

I configuret my SONOFF BN-SZ01 LIGHT like this:

  • platform: mqtt
    name: “Hodnik”
    state_topic: “stat/sonoff/POWER”
    command_topic: “cmnd/sonoff/POWER”
    availability_topic: “tele/sonoff/LWT”
    qos: 1
    payload_on: “ON”
    payload_off: “OFF”
    payload_available: “Online”
    payload_not_available: “Offline”
    retain: true
    brightness_command_topic: “cmnd/sonoff/DIMMER”
    brightness_scale: 50
    brightness_state_topic: “stat/sonoff/DIMMER”

All is working ok. But when I turn off the light and on again not remember the dimmer last state?

How can I do that?

thx in advance

Another question:

I set “brightness_scale: 50” but in states says “brightness: 255”?

Why is that?

The spec says it’s non-dimmable?

This is dimmable with Tasmota. I have one too. And same problem. Annoying feature is that Tasmota keeps the state (power-cycle from wall switch)…

Also it is problem when you manually dim it from Homekit or Tasmota-web page and then PIR fires the script -> default dim-state from the script overrides manual state. Is there a good way to store dimmer value in HomeAssistant?

My conf and another solver problem here: Conf

If you flash it with sonoff-tasmota firmware become dimmable

1 Like

Thanks for Conf.

I also wondering if is there a way to store dimmer value in ha?