Lovelace pictures for entity state

Is there a way in lovelace to display a picture for example based on the entity state? like this for example