Configure wifitoggle from scratch and assigning a button to it

Hi everyone, I recently bought a Buffalo WBMR-HP-G300H with OpenWrt 19.07.3 r11063-85e04e9f46 / LuCI openwrt-19.07 branch git-20.136.49537-fb2f363 on it. I configured like the other OpenWRT I have on a TP-Link WD8970 and it's working very well. I read in an Italian (my country) forum that someone was able to run a script to switch the wifi on and off and then assigning it to the AOSS button (a sort of WPS function provided by Buffalo). This is the link.
I tried to do the same creating the script called "woggle" in /sbin folder. This is the script:




case $(uci get wireless.$device.disabled) in


wifi down $device

uci set wireless.$device.disabled=1


echo "Wifi disabled"




uci set wireless.$device.disabled=0

wifi up $device


echo "Wifi enabled"




Then I made it executable with chmod +x /sbin/woggle
But, as soon as I run it then I wasn't able anymore to use LuCI to enable/disable. Luckily a reboot solved this issue. Then I remembered about wifitoggle, installed it and tried to configure it but it seems it doesn't work. Here it is the actual configuration of wifitoggle:


Where do I make mistakes or miss something?
Considering that I'm using the router for fast roaming purposes in my daughter's room, I'd like to give her the possibility to switch wifi on only when it's needed, switching it off, for example, before going to sleep.
I would be very grateful if someone could help me.
Thanks and Bye

UPDATE: I tried just rightnow to make a change in the wifitoggle configuration because I understood I wasn't precise in the configuration. Indeed I would have set "wps" as the button and not "wifi". Now the button seems to work....namely, if the wifi led is active on the device, it switches off if I click the button and, accordingly, "radio0" and wifi network become disabled in LuCI but...if I click the button once again, the led switches on but this doesn't happen on LuCI even if I enable the wifi through LuCI or restart "radio 0". Only if I reboot, then the device will start with "radio0" active and my wifi enabled. Any suggestion?