In order for the traffic lights to work automatically an intersection zone has to be created in the map editor.
Traffic lights in the same intersection zone are grouped automatically then switch in the same order each cycle.
If traffic light is not working then right click on it with a technical wrench to switch its color manually. This also triggers a system update and the traffic light should be included in the automatic cycle if an intersection zone exists.
Create intersection zone and open it. Click on the "automatic" toggle button to change it to "customized".
You can write a name for that scheme. By changing the name you can have multiple different schemes for the same intersection.
Click on the pencil icon to modify the scheme.
In the traffic lights scheme editor you have to select each light and assign a group ID for it.
You can also modify the blinking green light duration and yellow light duration.
In the timeline view click on the "+" icon and drag the green time range(s) for each group.
You can also create new green ranges by just dragging with the right mouse button.
You can move groups up/down by clicking on the traffic lights which are displayed on the left, and then clicking on teh up/down arrows.
You can delete green time range by clicking on it and then click the delete button next to the "+" button.
The full duration of the scheme is calculated automatically.
NB! If you have traffic light with 4 lights (3 lights + arrow) then this has to be in a separate group!