How will sensors behave with changing tariffs (Utility Meter)

So right now I have the following in my configuration.yaml:

#DSMR Readings
utility_meter:
  daily_energy_offpeak:
    source: sensor.power_low
    name: Daily Energy (Offpeak)
    cycle: daily
  daily_energy_peak:
    source: sensor.power_high
    name: Daily Energy (Peak)
    cycle: daily
  daily_energy_returned_offpeak:
    source: sensor.power_delivery_low
    name: Daily Energy Returned (Offpeak)
    cycle: daily
  daily_energy_returned_peak:
    source: sensor.power_delivery_high
    name: Daily Energy Returned (Peak)
    cycle: daily
  daily_energy_production:
    source: sensor.extra_total
    name: Daily Energy Production
    cycle: daily
  daily_gas:
    source: sensor.gas_usage
    name: Daily Gas
    cycle: daily
  monthly_energy_offpeak:
    source: sensor.power_low
    name: Monthly Energy (Offpeak)
    cycle: monthly
  monthly_energy_peak:
    source: sensor.power_high
    name: Monthly Energy (Peak)
    cycle: monthly
  monthly_energy_returned_offpeak:
    source: sensor.power_delivery_low
    name: Monthly Energy Returned (Offpeak)
    cycle: monthly
  monthly_energy_returned_peak:
    source: sensor.power_delivery_high
    name: Monthly Energy Returned (Peak)
    cycle: monthly
  monthly_energy_production:
    source: sensor.extra_total
    name: Monthly Energy Production
    cycle: monthly
  monthly_gas:
    source: sensor.gas_usage
    name: Monthly Gas
    cycle: monthly
  yearly_energy_offpeak:
    source: sensor.power_low
    name: Yearly Energy (Offpeak)
    cycle: yearly
  yearly_energy_peak:
    source: sensor.power_high
    name: Yearly Energy (Peak)
    cycle: yearly
  yearly_energy_returned_offpeak:
    source: sensor.power_delivery_low
    name: Yearly Energy Returned (Offpeak)
    cycle: yearly
  yearly_energy_returned_peak:
    source: sensor.power_delivery_high
    name: Yearly Energy Returned (Peak)
    cycle: yearly
  yearly_energy_production:
    source: sensor.extra_total
    name: Yearly Energy Production
    cycle: yearly
  yearly_gas:
    source: sensor.gas_usage
    name: Yearly Gas
    cycle: yearly

#Templates
template:
  #Sensors
  - sensor:
      - name: "Daily Energy Total"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_energy_offpeak')) and is_number(states('sensor.daily_energy_peak')) %}
            {{ states('sensor.daily_energy_offpeak') | float + states('sensor.daily_energy_peak') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Energy Cost"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_energy_offpeak')) and is_number(states('sensor.daily_energy_peak')) %}
            € {{ ( ( states('sensor.daily_energy_offpeak') | float * states('input_number.energy_offpeak_tariff') | float ) + ( states('sensor.daily_energy_peak') | float * states('input_number.energy_peak_tariff') | float ) + states('input_number.vaste_leveringskosten_stroom') | float + states('input_number.netbeheerkosten_stroom') | float ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Energy Total (Yesterday)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.daily_energy_offpeak','last_period')) and is_number(state_attr('sensor.daily_energy_peak','last_period')) %}
            {{ state_attr('sensor.daily_energy_offpeak','last_period') | float + state_attr('sensor.daily_energy_peak','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Energy Cost (Yesterday)"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_energy_offpeak')) and is_number(states('sensor.daily_energy_peak')) %}
            € {{ ( ( state_attr('sensor.daily_energy_offpeak','last_period') | float * states('input_number.energy_offpeak_tariff') | float ) + ( state_attr('sensor.daily_energy_peak','last_period') | float * states('input_number.energy_peak_tariff') | float ) + states('input_number.vaste_leveringskosten_stroom') | float + states('input_number.netbeheerkosten_stroom') | float ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Total"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.monthly_energy_offpeak')) and is_number(states('sensor.monthly_energy_peak')) %}
            {{ states('sensor.monthly_energy_offpeak') | float + states('sensor.monthly_energy_peak') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Cost"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.monthly_energy_offpeak')) and is_number(states('sensor.monthly_energy_peak')) %}
            € {{ ( ( states('sensor.monthly_energy_offpeak') | float * states('input_number.energy_offpeak_tariff') | float ) + ( states('sensor.monthly_energy_peak') | float * states('input_number.energy_peak_tariff') | float ) + ( states('input_number.vaste_leveringskosten_stroom') | float * now().day | float ) + ( states('input_number.netbeheerkosten_stroom') | float * now().day | float ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Total (Last Month)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.monthly_energy_offpeak','last_period')) and is_number(state_attr('sensor.monthly_energy_peak','last_period')) %}
            {{ state_attr('sensor.monthly_energy_offpeak','last_period') | float + state_attr('sensor.monthly_energy_peak','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Cost (Last Month)"
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.monthly_energy_offpeak','last_period')) and is_number(state_attr('sensor.monthly_energy_peak','last_period')) %}
            € {{ ( ( state_attr('sensor.monthly_energy_offpeak','last_period') | float * states('input_number.energy_offpeak_tariff') | float ) + ( state_attr('sensor.monthly_energy_peak','last_period') | float * states('input_number.energy_peak_tariff') | float ) + ( states('input_number.vaste_leveringskosten_stroom') | float * states('sensor.days_in_previous_month') | float(0) ) + ( states('input_number.netbeheerkosten_stroom') | float * states('sensor.days_in_previous_month') | float(0) ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Energy Total"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_energy_offpeak')) and is_number(states('sensor.yearly_energy_peak')) %}
            {{ states('sensor.yearly_energy_offpeak') | float + states('sensor.yearly_energy_peak') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Energy Cost"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_energy_offpeak')) and is_number(states('sensor.yearly_energy_peak')) %}
            € {{ ( ( states('sensor.yearly_energy_offpeak') | float * states('input_number.energy_offpeak_tariff') | float ) + ( states('sensor.yearly_energy_peak') | float * states('input_number.energy_peak_tariff') | float ) + ( states('input_number.vaste_leveringskosten_stroom') | float * now().strftime('%j') | float ) + ( states('input_number.netbeheerkosten_stroom') | float * now().strftime('%j') | float ) - ( states('input_number.vermindering_energiebelasting') | float * now().strftime('%j') | float ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Energy Total (Last Year)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.yearly_energy_offpeak','last_period')) and is_number(state_attr('sensor.yearly_energy_peak','last_period')) %}
            {{ state_attr('sensor.yearly_energy_offpeak','last_period') | float + state_attr('sensor.yearly_energy_peak','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Gas Total"
        device_class: gas
        unit_of_measurement: m³
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_gas')) %}
            {{ states('sensor.daily_gas') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Gas Cost"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_gas')) %}
            € {{ ( ( states('sensor.daily_gas') | float * states('input_number.gas_tariff') | float ) + states('input_number.vaste_leveringskosten_gas') | float + states('input_number.netbeheerkosten_gas') | float ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Gas Total (Yesterday)"
        device_class: gas
        unit_of_measurement: m³
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.daily_gas','last_period')) %}
            {{ state_attr('sensor.daily_gas','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Gas Cost (Yesterday)"
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.daily_gas','last_period')) %}
            € {{ ( ( state_attr('sensor.daily_gas','last_period') | float * states('input_number.gas_tariff') | float ) + states('input_number.vaste_leveringskosten_gas') | float + states('input_number.netbeheerkosten_gas') | float ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Gas Total"
        device_class: gas
        unit_of_measurement: m³
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.monthly_gas')) %}
            {{ states('sensor.monthly_gas') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Gas Cost"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.monthly_gas')) %}
            € {{ ( ( states('sensor.monthly_gas') | float * states('input_number.gas_tariff') | float ) + ( states('input_number.vaste_leveringskosten_gas') | float * now().day | float ) + ( states('input_number.netbeheerkosten_gas') | float * now().day | float ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Gas Total (Last Month)"
        device_class: gas
        unit_of_measurement: m³
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.monthly_gas','last_period')) %}
            {{ state_attr('sensor.monthly_gas','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Gas Cost (Last Month)"
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.monthly_gas','last_period')) %}
            € {{ ( ( state_attr('sensor.monthly_gas','last_period') | float * states('input_number.gas_tariff') | float ) + ( states('input_number.vaste_leveringskosten_gas') | float * states('sensor.days_in_previous_month') | float(0) ) + ( states('input_number.netbeheerkosten_gas') | float * states('sensor.days_in_previous_month') | float(0) ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Gas Total"
        device_class: gas
        unit_of_measurement: m³
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_gas')) %}
            {{ states('sensor.yearly_gas') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Gas Cost"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_gas')) %}
            € {{ ( ( states('sensor.yearly_gas') | float * states('input_number.gas_tariff') | float ) + ( states('input_number.vaste_leveringskosten_gas') | float * now().strftime('%j') | float ) + ( states('input_number.netbeheerkosten_gas') | float * now().strftime('%j') | float ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Gas Total (Last Year)"
        device_class: gas
        unit_of_measurement: m³
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.yearly_gas','last_period')) %}
            {{ state_attr('sensor.yearly_gas','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Days in previous month"
        state: >
          {% set this = now().replace(hour=0).replace(minute=0).replace(second=0).replace(microsecond=0) %}
          {% set previous = this.month - 1 if this.month - 1 >= 1 else 12 %}
          {% if previous in [1,3,5,7,8,10,12] %}
            {{ 31 }}
          {% elif previous in [4,6,9,11] %}
            {{ 30 }}
          {% elif previous == 2 and ((now().year-2000) % 4 > 0) %}
            {{ 28 }}
          {% elif previous == 2 and ((now().year-2000) % 4 == 0) %}
            {{ 29 }}
          {% endif %}

      - name: "Daily Cost Total"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_energy_offpeak')) and is_number(states('sensor.daily_energy_peak')) and is_number(states('sensor.daily_gas')) %}
            € {{ ( ( ( states('sensor.daily_energy_offpeak') | float * states('input_number.energy_offpeak_tariff') | float ) + ( states('sensor.daily_energy_peak') | float * states('input_number.energy_peak_tariff') | float ) + states('input_number.vaste_leveringskosten_stroom') | float + states('input_number.netbeheerkosten_stroom') | float ) + ( ( states('sensor.daily_gas') | float * states('input_number.gas_tariff') | float ) + states('input_number.vaste_leveringskosten_gas') | float + states('input_number.netbeheerkosten_gas') | float ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Cost Total (Yesterday)"
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.daily_energy_offpeak','last_period')) and is_number(state_attr('sensor.daily_energy_peak','last_period')) and is_number(states('sensor.daily_gas'))  %}
            € {{ ( ( ( state_attr('sensor.daily_energy_offpeak','last_period') | float * states('input_number.energy_offpeak_tariff') | float ) + ( state_attr('sensor.daily_energy_peak','last_period') | float * states('input_number.energy_peak_tariff') | float ) + states('input_number.vaste_leveringskosten_stroom') | float + states('input_number.netbeheerkosten_stroom') | float ) + ( ( state_attr('sensor.daily_gas','last_period') | float * states('input_number.gas_tariff') | float ) + states('input_number.vaste_leveringskosten_gas') | float + states('input_number.netbeheerkosten_gas') | float ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Cost Total"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_energy_offpeak')) and is_number(states('sensor.daily_energy_peak')) and is_number(states('sensor.daily_gas')) %}
            € {{ ( ( ( states('sensor.monthly_energy_offpeak') | float * states('input_number.energy_offpeak_tariff') | float ) + ( states('sensor.monthly_energy_peak') | float * states('input_number.energy_peak_tariff') | float ) + ( states('input_number.vaste_leveringskosten_stroom') | float * now().day | float ) + ( states('input_number.netbeheerkosten_stroom') | float * now().day | float ) ) + ( ( states('sensor.monthly_gas') | float * states('input_number.gas_tariff') | float ) + ( states('input_number.vaste_leveringskosten_gas') | float * now().day | float ) + ( states('input_number.netbeheerkosten_gas') | float * now().day | float ) ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Cost Total (Last Month)"
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.monthly_energy_offpeak','last_period')) and is_number(state_attr('sensor.monthly_energy_peak','last_period')) and is_number(state_attr('sensor.monthly_gas','last_period')) %}
            € {{ ( ( ( state_attr('sensor.monthly_energy_offpeak','last_period') | float * states('input_number.energy_offpeak_tariff') | float ) + ( state_attr('sensor.monthly_energy_peak','last_period') | float * states('input_number.energy_peak_tariff') | float ) + ( states('input_number.vaste_leveringskosten_stroom') | float * states('sensor.days_in_previous_month') | float(0) ) + ( states('input_number.netbeheerkosten_stroom') | float * states('sensor.days_in_previous_month') | float(0) ) ) + ( ( state_attr('sensor.monthly_gas','last_period') | float * states('input_number.gas_tariff') | float ) + ( states('input_number.vaste_leveringskosten_gas') | float * states('sensor.days_in_previous_month') | float(0) ) + ( states('input_number.netbeheerkosten_gas') | float * states('sensor.days_in_previous_month') | float(0) ) ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Cost Total"
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_energy_offpeak')) and is_number(states('sensor.yearly_energy_peak')) and is_number(states('sensor.yearly_gas')) %}
            € {{ ( ( ( states('sensor.yearly_energy_offpeak') | float * states('input_number.energy_offpeak_tariff') | float ) + ( states('sensor.yearly_energy_peak') | float * states('input_number.energy_peak_tariff') | float ) + ( states('input_number.vaste_leveringskosten_stroom') | float * now().strftime('%j') | float ) + ( states('input_number.netbeheerkosten_stroom') | float * now().strftime('%j') | float ) - ( states('input_number.vermindering_energiebelasting') | float * now().strftime('%j') | float ) ) + ( ( states('sensor.yearly_gas') | float * states('input_number.gas_tariff') | float ) + ( states('input_number.vaste_leveringskosten_gas') | float * now().strftime('%j') | float ) + ( states('input_number.netbeheerkosten_gas') | float * now().strftime('%j') | float ) ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Cost Total (Last Year)"
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.yearly_energy_offpeak','last_period')) and is_number(state_attr('sensor.yearly_energy_peak','last_period')) and is_number(state_attr('sensor.yearly_gas','last_period')) %}
            € {{ ( ( ( state_attr('sensor.monthly_energy_offpeak','last_period') | float * states('input_number.energy_offpeak_tariff') | float ) + ( state_attr('sensor.monthly_energy_peak','last_period') | float * states('input_number.energy_peak_tariff') | float ) + ( states('input_number.vaste_leveringskosten_stroom') | float * states('sensor.days_in_previous_month') | float(0) ) + ( states('input_number.netbeheerkosten_stroom') | float * states('sensor.days_in_previous_month') | float(0) ) ) + ( ( state_attr('sensor.monthly_gas','last_period') | float * states('input_number.gas_tariff') | float ) + ( states('input_number.vaste_leveringskosten_gas') | float * states('sensor.days_in_previous_month') | float(0) ) + ( states('input_number.netbeheerkosten_gas') | float * states('sensor.days_in_previous_month') | float(0) ) ) ) | round(2) }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Energy Returned"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_energy_returned_offpeak')) and is_number(states('sensor.daily_energy_returned_peak')) %}
            {{ states('sensor.daily_energy_returned_offpeak') | float + states('sensor.daily_energy_returned_peak') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Energy Returned (Yesterday)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.daily_energy_returned_offpeak','last_period')) and is_number(state_attr('sensor.daily_energy_returned_peak','last_period')) %}
            {{ state_attr('sensor.daily_energy_returned_offpeak','last_period') | float + state_attr('sensor.daily_energy_returned_peak','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Returned"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.monthly_energy_returned_offpeak')) and is_number(states('sensor.monthly_energy_returned_peak')) %}
            {{ states('sensor.monthly_energy_returned_offpeak') | float + states('sensor.monthly_energy_returned_peak') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Returned (Last Month)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.monthly_energy_returned_offpeak','last_period')) and is_number(state_attr('sensor.monthly_energy_returned_peak','last_period')) %}
            {{ state_attr('sensor.monthly_energy_returned_offpeak','last_period') | float + state_attr('sensor.monthly_energy_returned_peak','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Energy Returned"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_energy_returned_offpeak')) and is_number(states('sensor.yearly_energy_returned_peak')) %}
            {{ states('sensor.yearly_energy_returned_offpeak') | float + states('sensor.yearly_energy_returned_peak') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Energy Returned (Last Year)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_energy_returned_offpeak','last_period')) and is_number(states('sensor.yearly_energy_returned_peak','last_period')) %}
            {{ states('sensor.yearly_energy_returned_offpeak','last_period') | float + states('sensor.yearly_energy_returned_peak','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Energy Produced"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.daily_energy_production')) %}
            {{ states('sensor.daily_energy_production') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Daily Energy Produced (Yesterday)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.daily_energy_production','last_period')) %}
            {{ state_attr('sensor.daily_energy_production','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Produced"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.monthly_energy_production')) %}
            {{ states('sensor.monthly_energy_production') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Monthly Energy Produced (Last Month)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.monthly_energy_production','last_period')) %}
            {{ state_attr('sensor.monthly_energy_production','last_period') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Energy Produced"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(states('sensor.yearly_energy_produced')) %}
            {{ states('sensor.yearly_energy_produced') | float }}
          {% else %}
            None
          {% endif %}

      - name: "Yearly Energy Produced (Last Year)"
        device_class: energy
        unit_of_measurement: kWh
        state_class: total_increasing
        state: >
          {% if is_number(state_attr('sensor.yearly_energy_produced','last_period')) %}
            {{ state_attr('sensor.yearly_energy_produced','last_period') | float }}
          {% else %}
            None
          {% endif %}

#Tariffs (Greenchoice)
input_number:
  energy_peak_tariff:
    name: Normaaltarief Stroom
    initial: 0.17270
    unit_of_measurement: "EUR per kWh"
    min: 0
    max: 254

  energy_offpeak_tariff:
    name: Daltarief Stroom
    initial: 0.15565
    unit_of_measurement: "EUR per kWh"
    min: 0
    max: 254

  terugleververgoeding_stroom:
    name: Terugleververgoeding Stroom
    initial: 0.08000
    unit_of_measurement: "EUR per kWh"
    min: 0
    max: 254

  vaste_leveringskosten_stroom:
    name: Vaste leveringskosten Stroom
    initial: 0.18903
    unit_of_measurement: "EUR per dag"
    min: 0
    max: 254

  netbeheerkosten_stroom:
    name: Netbeheerkosten Stroom
    initial: 0.73338
    unit_of_measurement: "EUR per dag"
    min: 0
    max: 254

  vermindering_energiebelasting:
    name: Vermindering Energiebelasting
    initial: 2.2597
    unit_of_measurement: "EUR per dag"
    min: 0
    max: 254

  gas_tariff:
    name: Tarief Gas
    initial: 0.82927
    unit_of_measurement: "EUR per m³"
    min: 0
    max: 254

  vaste_leveringskosten_gas:
    name: Vaste leveringskosten Gas
    initial: 0.18903
    unit_of_measurement: "EUR per dag"
    min: 0
    max: 254

  netbeheerkosten_gas:
    name: Netbeheerkosten Gas
    initial: 0.51110
    unit_of_measurement: "EUR per dag"
    min: 0
    max: 254

Per the end of this month, the tariffs for energy and gas will change for me, since that will be the end of my contract. I was wondering though, once I change the input_numbers to their new prices what would happen. As you can see I calculate monthly and yearly prices as well, but those should ‘remain’ the same, since obviously the associated costs are with the old tariffs.

If changing the input_numbers would change all historical data as well, then I would like to ask you all how you guys handle this ‘problem’ with changing tariffs every year (or more often if you have a variable price contract).

[edit]
To clarify what I want to achieve: I want to change the input numbers (or create new ones?) and make sure that from that day onward the new prices are used, but that all historical data is calculated with their former input numbers… so to speak.

Your setup seems very complicated compared to mine, you have entities to calculate current/previous day energy and cost, current/previous months energy and cost, and current/previous years energy and cost. This is then all repeated for gas.

If you used your daily energy/gas entities in the Home Assistant Energy Dashboard then all this gets calculated for you automatically and stored in the statistics history. I believe that this would also overcome any issues associated with changing the tariffs assuming you did this at the end of the day before the tariiff changes occur.

I don’t have gas but the following shows how I have the Energy Dashboard configured for electricity monitoring:

I only need to specify the entities for daily energy usage and cost and everything else is calculated automatically as below for the current year:

This seems very accurate and always matches my bills to within a small fraction of a percent.

Is there a reason why you cannot use the Energy Dashboard?

@Jonah1970

Am I to understand your energy provider billing is calculated 1st of each month? Which would be the only way I can see dashboard depicting usage close to said provider’s numbers. My issue has always been dashboard monthly numbers are based on 1st of month through end of month. Where as my provider bills 16th of month through 15th of following month.

Also, it would be helpful to see your “Energy Cost Today” code.

Hi, yes I do get billed per calendar month so understand how this could be a problem in your situation (maybe you could ask your provider to change your billing date).

As requested, please find my template sensor for “energy cost today”:

energy_cost_today:
  friendly_name: Energy Cost Today
  unit_of_measurement: £
  value_template: "{{ (states('sensor.energy_usage_day_std') | float * states('input_number.std_tariff') | float / 100.0) | float + ((states('input_number.standing_charge') | float / 30.0) | float ) | round(2) }}"

There is a slight assuming in the above that assumes a month has 30 days i.e. the monthly standing charge (currently only £3.70) is divided by 30 and added to electricity cost for the day.

Of course the reason for doing this is because the Energy Dashboard can only use a rate in its calculation and there is currently no facility to enter a standing charge.

Hi, you need to setup the energy manager dashboard as explained below:

Obviously for this to work you will at least need a suitable sensor that is monitoring your energy usage.