Detach mode for zigbee switch

Hello!

I just bought a couple of zigbee switches to control my light bulbs and I’m wondering if there’s a way to have a “detach mode” similar to the SetOption 73 that tasmota have.

I’m planning to connect my switch and add some controls based on time. If someone tries to turn on the light after 10 pm, send a mqtt command to control a led strip but if someone tries to turn on the light before 10 pm, just turn the normal bulb.

Zigbee2MQTT won’t be able to host that kind of logic, it only exposes events to the MQTT bus and allows you to control the lights back. You will need to have some other software listening to the button presses on MQTT, doing the time check and sending that back to the light or the LED strip. I use a custom python script with the Paho MQTT client module, but Home Assistant automations, node red or whatever you have would work as well.