I use Octopus Energy in the UK (with a HomeMini) and just used @erkr instructions above to add an hourly Standing Charge.
I just added this to my configuration.yaml:
template:
- sensor:
- name: "Electricity Standing Charge"
unique_id: Electricity Standing Charge
state: 0
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
- trigger:
- platform: time_pattern
hours: "/1"
sensor:
- unique_id: standing_charge_per_hour
name: "standing charge per hour"
unit_of_measurement: "£"
state_class: total_increasing
state: |
{% set hours=((as_timestamp(now())-as_timestamp(as_datetime('2023-11-10'))) / 3600) %}
{{ (hours+1) * 0.025075 }}
- sensor:
- name: "Gas Standing Charge"
unique_id: Gas Standing Charge
state: 0
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
- trigger:
- platform: time_pattern
hours: "/1"
sensor:
- unique_id: gas_standing_charge_per_hour
name: "gas standing charge per hour"
unit_of_measurement: "£"
state_class: total_increasing
state: |
{% set hours=((as_timestamp(now())-as_timestamp(as_datetime('2023-11-11'))) / 3600) %}
{{ (hours+1) * 0.0114458333 }}
And then added a new Electricity Consumption & Gas Consumption to my Energy Dashboard thus:
The 0.025075 and the 0.0114458333 are the Hourly amounts of my Daily Standing Charge.
However, I’m not sure I like using an Hourly Standing Charge, as my Energy Provider obviously charges daily. So I think I would prefer to see a Daily Charge added just after midnight, although I’m unsure how to alter the template sensors to allow for this.