...
Automation of setting any traffic-light custom field to a certain value based on SLA data
Also, you can configure frequently scheduling for the automated setting of traffic-light custom field(s) depending on a pre-defined JQL.
Within the JQL, you can access your SLA fields as shown in my sample screen copy below:
...
so, you can set a traffic-light to e.g. "yellow" in case of the risk breaching an SLA etc.
So, you cannot set traffic-light field(s) in real-time by Jira Automation but within the following provided time intervals. Generally, field updates every 15 min should be okay from a business perspective …
...
In order to configure such a service, please read my docu at Administration & Automation#Scheduleautomaticsettingoftraffic-lights.