The brief
The A5's electronic parking brake had got unreliable, sometimes not engaging or releasing on the first press, with a warning coming up on the dash. He brought it in. On these the parking brake is electronic, applied and released by motors at the rear wheels, and you operate it with a button in the centre console. That button is a switch like any other, and over time the contacts inside it wear and it stops sending a clean signal, so the system doesn't respond reliably and flags a fault. The brakes themselves are fine, it's the switch that's not telling them what to do. A parking brake you can't trust is one you fix, so it came in.
The diagnosis
A scan showed the fault sitting with the parking brake switch input, not with the brake motors or the calipers, and a check of the button confirmed it was giving an intermittent signal, dropping in and out when pressed. That's a switch replacement. You don't rebuild the button, so the unit gets changed and the system reset.
The work
The trim around the parking brake button was removed, the old switch unplugged and taken out, and a new genuine Audi-spec parking brake button fitted, the connector clicked back home and the trim refitted. Then the stored fault was cleared and the parking brake cycled on and off several times on the scanner to confirm the new switch was registering cleanly. A check confirmed the parking brake engaged and released first time, every time, with no warning.
The outcome
The parking brake engaging and releasing reliably on the first press, and the dash warning gone. The A5 went home with the parking brake working as it should. A flaky parking brake switch is the kind of thing that's easy to keep wrestling with until it leaves you stuck, so swapping the button and resetting the system put it right for good.