I am using a Emporia Vue 3 to measure the power consumption at our main DB. From there, two commercial buildings and a private house are connected and measured. All working fine.
I would like to analyse the costs and recreate an “invoice” similar to the one from the power supplier but with a differentation of calculating the costs for each building.
Now tariffs are coming in, which should not be a problem using the utility meter helper.
Since I am in South Africa, our power supplier Eskom is not only using daily tariffs (on-/offpeak times) which repeat themselves weekly, but different tariffs by seasons. Two months in winter called high demand season are different from the rest of the year. I will have to use two schedules for high and low demand season.
That is where I am stuck. I thought of using an automation which activate the seasons, but I am not aware of any option to switch helpers on or off.
Is there any option with the utility meter which I missed? Can a helper be activated by an automation?
So you have four tariffs, off peak, peak, off peak high demand and peak high demand.
Switch them with an automation directly using template triggers or use the state of a template sensor to trigger the automation that switches the tariff. I prefer the latter as I can also display the sensor that shows the current tariff in my dashboard.
I only have two tariffs (peak /off peak) but the times change with daylight savings.
If you need help with the template you will need to supply the actual peak / off peak times and high demand dates.
utility_meter: # you will need to adjust this to use your sensor
energy_from_grid_daily:
source: sensor.energy_import
cycle: daily
tariffs:
- Peak
- Offpeak
- Peak High Demand
- Offpeak High Demand
Template sensor
template:
- sensor:
- name: Current Tariff
state: >
{% if 5 < now().month < 9 %}
{% if 6 <= now().hour < 18 %}
Peak High Demand
{% else %}
Offpeak High Demand
{% endif %}
{% else %}
{% if 6 <= now().hour < 18 %}
Peak
{% else %}
Offpeak
{% endif %}
Wow… Tom, you are awesome. Thank you for your time pointing me in the right direction. I did not try it out, but to my understanding it is possible to choose the right tariff with an automation?
However, meanwhile I entered the tariff schedule in the native HA calendar. The automation should then be able to switch to the correct tariff depending of the title/message of the calendar event.
Edit: I don’t understand the monthly timeframe you are giving, for example: