NEC 410.141 (B)
The switch or circuit breaker shall be located within sight from the luminaires or lamps, or it shall be permitted elsewhere if it is provided with a means for locking in the open position.
The provisions for locking or adding a lock to the disconnecting means must remain in place at the switch or circuit breaker whether the lock is installed or not. Portable means for adding a lock to the switch or circuit breaker shall not be permitted.