Picture element with changing colour border depending on state

Hi,

I’ve searched for a way of doing this but cannot find any. I’ve got Custom Button Card but it doesn’t appear to do what I need.

I’d like a border on a picture element/entity (of my garage door camera, camera.garage) which will show a thick green border when the door opener (cover.garage) is closed and red when it is open.

Can anyone suggest how this can be achieved please?

Thanks,

Matt

I´m searching the same (or similar). I have a picture-elements with state-icon entity. I´d like show a border with CSS when entity is “ON” and NO-border when is “OFF”.
Thanks…

This is what I’ve done so far. My ultimate aim is to get rid of the buttons and use the images with coloured borders to show status.