Statistic Card - Fixed Time Period by hours

Use case: Electricity provider charges a demand surcharge. Calculated by multiplying the maximum spike in energy usage over the time period each day. Sensor to view the maximum energy usage between a set time period each day would help identify that cost each day and help to minimise energy usuage during that time period.

Eg.

type: statistic
entity: sensor.energy_consumption
period:
  fixed_period:
    start: 1600
    end: 2100
stat_type: max

Yes, please. It could be also done by supporting templates for the start and end field, e.g.:

type: statistic
entity: sensor.energy_consumption
period:
  fixed_period:
    start: "{{ now().replace(hour=16, minute=0, second=0, microsecond=0) }}"
    end: "{{ now().replace(hour=21, minute=0, second=0, microsecond=0) }}"
stat_type: max