Hi there,
I’m in the UK and have a standing charge for electricity (daily) and unit rate. Unit rate seems to be calculated fine - but standing charge isn’t working.
At the moment this is my setup:
sensor.electricity_cost_today
{% set kwh = states('sensor.shellyem_channel_1_energy_cost') | float %}
{% set price_per_kwh = 0.2292 %}
{% set standing_charge = 0.4906 %}
{{ (kwh * price_per_kwh + standing_charge) | round(2) }}
sensor.standing_charge_electricity
{{ 0 }}
Unit of measurement: KwH
Device Class: energy
State class: Total
input_text.tariff_import_standing_charge_cumulative
sensor.tariff_import_standing_charge_cumulative
And then an automation setup:
alias: Electricity Standing Charge
description: ""
triggers:
- trigger: time
at: "00:00:01"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
conditions: []
actions:
- action: input_number.set_value
metadata: {}
data:
value: >-
{{
states('input_text.tariff_import_standing_charge_cumulative')|float(0)
+ states('sensor.standing_charge_electricity')|float(0)}}
target:
entity_id: input_text.tariff_import_standing_charge_cumulative
mode: single