What is the best way to configure zigbee dimmable light with physical switch?

So, I have a TRADFRI bulb, TRADFRI on/off switch, both joined to my zigbee2mqtt network and discovered in HA. I also have a Sonoff mini running tasmota. I want to

  • Be able to use the “primary function” (on off) of the light without any smarthome (in case of server down or HA install broken)

  • Not getting blinded by the light when power is back after a power outage

  • Use the dimmer function

What I did :

  • Set the bulb power_on_behavior to ON

  • PowerRetain 1 on Tasmota

This will take care of the power outages and manual control of the light (Sonoff Mini has mechanical switch connection headers)

Created 5 automations with TRADFRI on/off:

  • ON action → turns sonoff mini on

  • OFF action → turns sonoff mini off

  • Move brightness up action → send mqtt {"brightness_move": 40}

  • Move brightness down action → send mqtt {"brightness_move": -40}

  • Stop brightness action → send mqtt {"brightness_move": 0}

Is that the cleanest way to achieve this ? I think 5 automations is pretty “heavy” but could not think of a cleaner way.

Also, what would be the solution to the following problem : HA is down, my light turns on thanks to the Sonoff mini but the brightness is set to 1% (last state before shutdown) ?

I simply bound my Tradfri on/off switch (E1743) to my Tradfri bulb. So it still works when HA is down. And I don’t have to create automations to dim up/dim down.

Is it possible to have the bulb paired with bot zigbee2mqtt and a remote ? (I’d rather not use the ikea gateway)

You first have to create a group, and then bind the E1743 to the group (I have a group with 1 bulb)

See :

under binding

You just made my whole week. (I’m new to Zigbee). THANKS !