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.

Vueling withdraws winter flights to Aicante this winter
Playground in Barry forced to close after fire damages equipment
Campaigners Take Fight for Fairer Pathways in Welsh Women’s Football to Parliament
Vale Councillor Gwyn John Launches His First Novel at Llantwit Major Book Signing
Pink poppy display commences with celebration of life
Former Barry office block converted into new homes for people at risk of homelessness
Welsh Government publishes independent report on Level 4 intervention at Cardiff and Vale UHB
Three CoastSnap stations set to be installed along the Glamorgan Heritage Coast
Daffodil Runner statue installed at Marie Curie Hospice in Penarth
Woman Dies After Incident in Leckwith as Police Investigation Continues
Vale entrepreneur wins national Innovate UK award for sustainable construction technology
Cardiff Airport retains top accessibility rating as regulator reports record demand for assistance
Open Doors event to showcase hidden world of Glamorgan Archives
New details have emerged of a new tree-lined public square that will replace a traffic dominated junction
Dyffryn Gardens’ Edwardian rose garden blooms again after decade-long restoration
Barry’s Own Daniel White to Walk 190 Miles Back to Where His Round Table Story Began
1,300 people attend Flying Start Family Fun Day
Dispersal order put in place to tackle anti-social behaviour
Interim Chief Executive Appointed at Cardiff and Vale University Health Board
Cardiff Theatre Marks 50 Years of Service for Long‑Standing Staff Member