@yuxin.zou thank you for your answer, I was able to get the button working. Button name has changed from BTN_0 to switch. I get what you are saying about LEDs, That's not the scenario I'm looking for if you look at the script above I used to trigger LED blinking when I changed switch position that way I knew that something happened. Anyway here is the new script that works (except for the LEDs)
#!/bin/sh
# logger "BTN: Button pressed ${BUTTON} ${ACTION}"
if [ "${BUTTON}" = "switch" ] && [ "${ACTION}" = "released" ]; then
logger "BTN: Wifi enabled"
uci set wireless.@wifi-device[0].disabled=1
uci set wireless.@wifi-device[2].disabled=1
uci set wireless.@wifi-device[3].disabled=1
uci set wireless.@wifi-device[1].disabled=0
uci set wireless.@wifi-iface[1].disabled=0
mt1300_led both_breath
elif [ "${BUTTON}" = "switch" ] && [ "${ACTION}" = "pressed" ]; then
logger "BTN: Wifi disabled"
uci set wireless.@wifi-device[0].disabled=1
uci set wireless.@wifi-device[2].disabled=1
uci set wireless.@wifi-device[3].disabled=1
uci set wireless.@wifi-device[1].disabled=1
uci set wireless.@wifi-iface[1].disabled=1
mt1300_led both_flash fast
fi
uci commit wireless
wifi reload
wifi