I setup the following in /config/configuration.yaml
utility_meter:
daily_energy:
source: sensor.energy_import
name: Daily Import
cycle: daily
tariffs:
- OffPeak
- Shoulder
- Peak
daily_energy_export:
source: sensor.energy_export
name: Daily Export
cycle: daily
tariffs:
- buyback
How am I triggering the different tariffs?
I am using the following sensor to determine what tariff time it is right now.
# Australian Ausgrid NSW Peak-shoulder-offpeak sensor defined
# https://www.ausgrid.com.au/Your-energy-use/Meters/Time-of-use-pricing
# Peak: 2pm - 8pm on working weekdays 1 November - 31 March;
# Peak: 5pm - 9pm on working weekdays 1 June - 31 August
# Off-peak: 10pm - 7am
# Shoulder: all other times
- sensor:
name: TOU Period
icon: mdi:clock-time-three-outline
state: >
{% set tou_period = 'shoulder' %}
{% set n_month = now().month %}
{% set n_hour = now().hour %}
{% set is_summer = (n_month <= 3 or n_month >= 11) %}
{% set is_winter = (6 <= n_month <= 8 ) %}
{% if n_hour >= 22 or n_hour < 7 %}
{% set tou_period = 'offpeak' %}
{% elif ((is_summer and (14 <= n_hour <= 19))
or (is_winter and (17 <= n_hour <= 20)))
and (is_state("binary_sensor.workday_sensor", "on")) %}
{% set tou_period = 'peak' %}
{% endif %}
{{tou_period}}
Note: this sensor.tou_period uses the workday integration.
You will need to add this integration for sensor.tou_period to work properly.
I must give credit to @Muppetteer for showing me this.
Use this view to confirm it is working the way you like it.

I am then using the following 3 automations to trigger what tariff I want utility_meter to attribute the consumption to depending on the current value of sensor.tou_period.
/config/automations.yaml
- alias: Tariff Shoulder
description: ''
trigger:
- platform: state
entity_id:
- sensor.tou_period
to: shoulder
condition: []
action:
- service: select.select_option
data:
option: Shoulder
target:
entity_id:
- select.daily_energy
mode: single
- alias: Tariff Offpeak
description: ''
trigger:
- platform: state
entity_id:
- sensor.tou_period
to: offpeak
condition: []
action:
- service: select.select_option
data:
option: OffPeak
target:
entity_id:
- select.daily_energy
mode: single
- alias: Tariff Peak
description: ''
trigger:
- platform: state
entity_id:
- sensor.tou_period
to: peak
condition: []
action:
- service: select.select_option
data:
option: Peak
target:
entity_id:
- select.daily_energy
mode: single
Graph Example showing the values of each tariff increasing at the correct time of day as well as being reset at midnight every night.
At this point, I could add these to Energy Dashboard in their current state, however I now want to calculate the costs.
I created the following input_number helpers.
and then setup the following sensor to change the tariff price whenever sensor.tou_period changed its state.
template:
- sensor:
- name: Tariff Price
unit_of_measurement: AUD/kWh
state: >
{% if is_state('sensor.tou_period', 'peak') %}
{{ states('input_number.peak') | float(0) * states('input_number.discount') | float(0) }}
{% elif is_state('sensor.tou_period', 'shoulder') %}
{{ states('input_number.shoulder') | float(0) * states('input_number.discount') | float(0) }}
{% else %}
{{ states('input_number.offpeak') | float(0) * states('input_number.discount') | float(0) }}
{% endif %}
- sensor:
- name: Tariff Price Export
unit_of_measurement: AUD/kWh
state: >
{{ states('input_number.feed_in') }}
Graph example

Now we can finally add the sensors to Energy Dashboard.
Go to Settings / Dashboards / Energy / Add Consumption
Individually add these 3 sensors, each with sensor.tariff_price for the current price
sensor.daily_import_offpeak
sensor.daily_import_peak
sensor.daily_import_shoulder
Then for Add Return use sensor.daily_energy_export_buyback to use sensor.tariff_price_export for the current price
Then add Solar Production and choose sensor.energy_production
How it should look.
After a few hours, it should start to look like this
with a table like this

That should do it!