update toggle button to send command