Friendly name for history_stats platform?

I setup some sensors using the history stats platform for a binary sensor. But i don’t think it supports the ‘friendly’ name option. And this is what it shows when i open the entity. Is there any way of giving it a unique id or am i stuck with whatever name i setup in the history stats platform (i don’t think i can use a name with spaces (e.g. friendly). ?

For example currently using:

  - platform: history_stats
    name: left_sleep_stats_on
    entity_id: binary_sensor.master_bedroom_bedsensor_1_contact
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"

and i will always see the left_sleep_stats_on entity in a card. I thought maybe it will pick up the friendly name from the binary sensor but no.

Give it the name: Left Sleep Stats On, so the friendly_name will be Left Sleep Stats On and the entity_id sensor.left_sleep_stats_on.

EDIT: You can always customize things like friendly_name, icon, … and so on.