History with entity_id instead of friendly name?

It’s possible to record the History with entity_id instead of friendly name? Friendly name can be misinterpreted and may exist duplicates… entity_id, instead, it’s unique!