Ability to define units of measure dynamically

May of use use HA to monitor their IT infrastructure, including routers and firewalls.
In such a case, we deal with e.g. number of bytes transferred.

It will be nice if it will be possible to display values in proper units: Mb/Gb/Tb.
writing template sensor is easy, but it lacks ability to define units of measurement in runtime.