Horizontal-stack of 2 pictures (Pics change based on calendar event)

Hello,

I need help to achive this…
I want to have an horizontal stack of two pictures.
I want the picture to change based on a state of my calendar.
Can I put all the code in the lovelace card?

Tks for your help!

Regards,

Max

    state_image:     
    "calendar.ecole, message, Eli_Art" : local/eli_Art.jpg
    "calendar.ecole, message, Eli_Educ" : local/eli_Educ.jpg
    "calendar.ecole, message, Eli_Anglais" : local/eli_Anglais.jpg
    type: picture-entity
    entity: calendar.ecole
    state_image:     
    "calendar.ecole, message, Marie_Art" : local/Marie_Art.jpg
    "calendar.ecole, message, Marie_Educ" : local/Marie_Educ.jpg
    "calendar.ecole, message, Marie_Anglais" : local/Marie_Anglais.jpg
    type: picture-entity
    entity: calendar.ecole
type: horizontal-stack