Llandough Hospital has installed two buzzers to help catch out people who smoke on their grounds.
Since St David's Day 2021, it's been illegal to smoke anywhere on hospital grounds across Cardiff and the Vale.
But health chiefs say some people are still lighting up - with staff raising concerns about patients, visitors and even their fellow colleagues smoking outside entrances and around the site.
Now, two loudspeaker systems have been installed outside the main hospital entrance and the entrance to the Hafan y Coed mental health unit.
If somebody is caught smoking, people can hit the red buzzer to activate the loudspeaker, which plays a stop smoking message which urges people to put out their cigarette or seek help on how to kick the habit.
Anyone caught smoking on the hospital grounds could face a £100 fixed penalty notice.
According to the Cardiff and Vale health board, the buzzers are just inside the entrances but far enough away for the smoker not to see who pressed it.
Catherine Perry, principal public health practitioner at CAVUHB, said: "While smoking rates have come down across Wales in recent years, the health board continues to receive complaints about smoking on hospital grounds, putting the health of patients, colleagues and the public at risk."
"When people smoke on hospital sites, patients are forced to breathe in toxic second-hand smoke - including some of our most vulnerable. Sometimes patients have to walk through second-hand smoke to get in and out of the hospital which is deeply unpleasant."
"We hope these loudspeaker messages will make people think twice about lighting their cigarettes and seek free, professional support through the Help Me Quit programme. We are committed to the Welsh Government’s tobacco control strategy for Wales which aims to create a smoke-free Wales by 2030.”
Similar buzzers and loudspeakers have also been installed at the University Hospital of Wales in Cardiff.

Post Office Seeks New Operator in Dinas Powys as Village Faces Loss of Its Last Branch
Gardening team praised after helping police clear fallen tree near St Brides Major
Specsavers calls on children in Barry to design Wales Deaf Rugby World Cup shirts
Whitmore High Named One of UK’s Best Workplaces for Development
Steel Signing Marks Major Milestone in St Richard Gwyn School Redevelopment
Two Rescues in Record Heat as Volunteer Teams Respond to Afternoon Emergencies
Police find evidence of a large-scale cannabis cultivation at Riverside Place property fire
Network Rail confirm closure of Brookside level crossing in Dinas Powys
Police given powers to ask people to leave Comeston Lakes Country Park
Planned children’s role play centre could be given the go-ahead by Vale Council
Marie Curie Garden Fayre deemed huge success
Council seeks views on Future of Colcot Sports Centre and Buttrills Playing Fields
First Minister quizzed on further devolution, budget decisions, and misinformation in FMQs
Extreme heat leads to changes to services and closures
Severe Heat Warning Set to Disrupt Rail Travel Across South Wales This Week
Communities asked to support older people across Wales during severe heat warning
Caribbean Community Wales Brings Wales‑Wide Launch to Barry This Weekend
Community Award winner calls for sanitary bins in men’s toilets after living with prostate‑cancer‑related incontinence
Cardiff Airport Backs Holiday Safety Campaign Honouring Rhoose Teenager Tom Channon