It would be nice if ESPHome supported icon templating directly. For example if you create a sensor you may want a different icon based on the state of that sensor, etc.
I am aware of workarounds to set the the icon in a lambda or to create a duplicate template sensor in Home Assistant itself which then has the icon being templated. But it always just seems like a workaround, and means I’ve duplicated many sensors with a template just for the icons, why can’t ESPHome just support templating of icons?
If it turns out there is already a clean way to do this then I’d love to hear how.