Hildebrand Glow Meter - New Sensors Added!

If anyone is interested I have created three new entities which work alongside the "Hildebrand Glow IHD Home Assistant integration on GitHub. Now you can read the Cost Per Hour, Per Week and Per Month as shown on the Glow Meter but not available ordinarily. Copy the code below into your configuration YAML file, restart HA and add them to your dashboard. Hope this helps someone!!

template:
  - sensor:  
    - name: Energy Cost Per Hour
      unit_of_measurement: "GBP"
      state_class: total_increasing
      device_class: energy
      state: "{{ (states('sensor.smart_meter_electricity_power') | float * states('sensor.smart_meter_electricity_import_unit_rate') | float) | round(2) }}"          
    - name: Energy Cost Per Week
      unit_of_measurement: "GBP"
      state_class: total_increasing
      device_class: energy
      state: > 
          {% set start_of_week = now().replace(hour=0, minute=0, second=0) - timedelta(days=now().weekday()) %}
          {% set days_since_start_of_week = now().weekday() + 1 %}
          {% set entity1_value = (states('sensor.smart_meter_electricity_import_this_week') | float * states('sensor.smart_meter_electricity_import_unit_rate') | float) | float | round(2) %}
          {% set entity2_value = (states('sensor.smart_meter_electricity_import_standing_charge') | float) | round(2) %}
          {{ entity1_value + ((entity2_value * days_since_start_of_week) | float) | round(2) }}                
    - name: "Energy Cost Per Month"
      unit_of_measurement: "GBP"
      state_class: total_increasing
      device_class: energy
      state: >
          {% set current_day = now().day %}
          {% set days_in_month = (now().replace(day=1).replace(month=now().month % 12 + 1).replace(day=1) - timedelta(days=1)).day %}
          {% set entity1_value = (states('sensor.smart_meter_electricity_import_this_month') | float * states('sensor.smart_meter_electricity_import_unit_rate') | float) | float | round(2) %}
          {% set entity2_value = states('sensor.smart_meter_electricity_import_standing_charge') | float %}
          {{ entity1_value + (entity2_value * current_day) }}