Ultrasonic repellents work with badgers.
So all you need is a light that when it flashes, emits an ultrasonic intermittent noise to scare Mr Badger away.
Unless you've experience in wiring in electronics, the help of an expert may be required. Perhaps Nealh or one of the other gurus could offer their services.
Of course now its a case of slamming the burrow door after the badger had bolted, but it might in the future stop it from happening again.
Also works for foxes, cats, dogs and even raccoons. Though the chances of Raccoons being abroad late in the evening are slim, you will be protected none the less