While there are customizing features for entities there is no way to append an attribute to a defined entity. Attributes are normally assigned by integrations since the underlying data is necessary to attach an attribute. What if that data was supplied external to the integration? For instance, a history template for an entity produces a time value expressed in hours. On your Lovelace view you want the time expressed as hh:mm:ss or hh:mm so the entity supplied to the Lovelace card is the time reformatted as a time string. Strings cannot be assigned a unit_of_measure so the history is displayed as a multicolored line. What you really want when you tap the entity is a line graph with time in floating point hours plotted against real time. If an attribute could be attached to the formatted time sensor the underlying data could point to the original history template sensor with time expressed in hours.