Lovelace state_icon

Several Lovelace cards support the state_image option (display a different image based on an entity’s state). Would be nice if we could do the same with icons. The glance card would be a good start.

Yes, I know I can dynamically set the icon with a template sensor or template binary sensor, but with component defined sensors it isn’t possible to add the template without creating a second sensor which just seems wasteful.