I got a idea, I though that maybe I should use 2 switch when both of them are open the red light are on, then when one of them is close the capacitor or something give some sec of current to the red led then when it's empty the red led turn off and green led turn on because another capacitor or something is full. For the other switch I would like when close to simply turn off the red led after some sec and keep both red and green leds off.
Of course both switch will never be closed at the same time
Do you know how I could make that?