Fading in between two materials overtime?

I am not able to make this code to work. Everything works except the transmission/fade, it does not appear. The material[0] just changes to material[1] without transmission.
Is something wrong with my code, or does anyone has alternative way to make this work?

Thank you!

    using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ChangeMaterial : MonoBehaviour
{
    public Material[] material;
    Renderer rend;
    float duration = 0.5f;

    // Start is called before the first frame update
    void Start()
    {
        rend = GetComponent<Renderer>();
        rend.enabled = true;
        rend.sharedMaterial = material[0];
    }

    void OnTriggerEnter(Collider col)
{
    if (col.gameObject.tag == "zone1")
    {
        var lerp = Mathf.PingPong (Time.time, duration) / duration;
    GetComponent<Renderer>().material.Lerp (material[0], material[1], lerp);
    }
}

}

OnTriggerEnter() is only called once, use OnTriggerStay() which is called every frame when the trigger is intersected, likewise in the docs example Update() is used.

@Magso

Thank you for your time!

Here is my current code, the OnTriggerExit does not work. I did try to set duration to 3f, but now nothing happens. Only when it is set to 0f it changes directly to material[1]. But can not make it to work as its fading to another material. Kinda loosing hope about this. Do you know about any other way to make this work?

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class ChangeMaterial : MonoBehaviour
 {
     public Material[] material;
     Renderer rend;
     float duration = 3f;
 
     // Start is called before the first frame update
     void Start()
     {
         rend = GetComponent<Renderer>();
         rend.enabled = true;
         rend.sharedMaterial = material[0];
     }
 
     void OnTriggerStay(Collider col)
 {
     if (col.gameObject.tag == "zone3")
     {
         var lerp = Mathf.PingPong (Time.time, duration) / duration;
     GetComponent<Renderer>().material.Lerp (material[0], material[1], lerp);
     }

     }

     void OnTriggerExit(Collider col)
 {
     if (col.gameObject.tag == "zone3")
     {
         var lerp = Mathf.PingPong (Time.time, duration) / duration;
     GetComponent<Renderer>().material.Lerp (material[1], material[0], lerp);
     }

     }

}

It was because i was using Lightweight RP so i had to use a different syntax.

Thanks a lot though to @Magso