How to add multi-tarrif into HA using CT clamp #shelly #pv #tarrif

I am based in Perth, Western Australia. We have some of the cheapest solar system’s. My goal is to:

  1. Maximise utilisation of the Solar PV system
  2. Minimise costs from the electricity grid using the Synergy Time of Use tariff (Synergy EV Home Plan – Electric Vehicle Add On Rates & Prices)
  3. Educate my family on how to utilise equipment for lowered run costs
  4. Get my wife on-board for all the future home automation things I will buy :stuck_out_tongue:

What i have in my setup

  • Home Assistant
  • HACS Add-On
  • Solar Inverter
  • CT Clamp system
  • YAML (copy and paste)

What my dashboard looks like

Home Assistant : My HA has moved hosts from RPi3, RPi4 and is now a proxmox host using docker. Here is a decent video on the setup https://youtu.be/GoZaMgEgrHw?si=93vuW5ok_2tqP6RX

Home Assistant Community Store (HACS) I quickly noticed I needed to use some of the more beta features of HA which essentially all live in HACS. Here is a 6min video on getting HACS running https://youtu.be/oXaGqjaKbeE?si=J9XsgG_WVJfYnUQq

Solar Inverter I have an old Delta 5kW to connect to my 3-phase (3P) meter box. Any PV system will do. If I was to buy again I would pick a Fronius Gen24 system as they have a free/native API that can give you generation data to be used with the energy module in HA.

CT Clamps I am using the Shelly 3EM, this local-only wifi device lives in my meter box and is only clamped over my mainlines to tell me net consumption/ generation. Here is a video from my sparky on the setup https://youtu.be/kDIK0BP4Xss?si=Gjp97ST3gm4r9bQc

DISCLAIMER: I am a tight-ass and only installed 1 of these unit’s I would recommend 2 if I was to do this again so I can see what I generated.

HA Energy Dashboard Since only have a single unit production on my dashboards is only what I sold back to the grid, NOT what was produced. As I am in Perth on a summer’s day I produce around 37 to 42kWh a day.

Here is a fairly nice day of generation

YAML, automation… yuck: So to get pricing right you need to define a time of use automation.

You will need to configure the Utility Meter here is a great video for getting this done generically. https://youtu.be/W7mVagcssZY?si=HGengkN3V8VuTl1J

Here is the code you need for the variable time-of-use tariff

3P Channel A

alias: TOU Energy Tariffs CH:A
description: Synergy WA
trigger:
  - platform: time
    at: input_datetime.tou_06_00_off_peak
    variables:
      tariff: Off Peak
  - platform: time
    at: input_datetime.tou_09_00_super_off_peak
    variables:
      tariff: Super Off Peak
  - platform: time
    at: input_datetime.tou_15_00_peak
    variables:
      tariff: Peak
  - platform: time
    at: input_datetime.tou_21_00_off_peak
    variables:
      tariff: Off Peak
  - platform: time
    at: input_datetime.tou_23_00_overnight
    variables:
      tariff: Overnight
action:
  - service: select.select_option
    target:
      entity_id: select.tou_em_channel_a_energy
    data:
      option: "{{ tariff }}"
mode: single

3P Channel B

alias: TOU Energy Tariffs CH:B
description: Synergy WA
trigger:
  - platform: time
    at: input_datetime.tou_06_00_off_peak
    variables:
      tariff: Off Peak
  - platform: time
    at: input_datetime.tou_09_00_super_off_peak
    variables:
      tariff: Super Off Peak
  - platform: time
    at: input_datetime.tou_15_00_peak
    variables:
      tariff: Peak
  - platform: time
    at: input_datetime.tou_21_00_off_peak
    variables:
      tariff: Off Peak
  - platform: time
    at: input_datetime.tou_23_00_overnight
    variables:
      tariff: Overnight
action:
  - service: select.select_option
    target:
      entity_id: select.tou_em_channel_b_energy
    data:
      option: "{{ tariff }}"
mode: single

3P Channel C

alias: TOU Energy Tariffs CH:C
description: Synergy WA
trigger:
  - platform: time
    at: input_datetime.tou_06_00_off_peak
    variables:
      tariff: Off Peak
  - platform: time
    at: input_datetime.tou_09_00_super_off_peak
    variables:
      tariff: Super Off Peak
  - platform: time
    at: input_datetime.tou_15_00_peak
    variables:
      tariff: Peak
  - platform: time
    at: input_datetime.tou_21_00_off_peak
    variables:
      tariff: Off Peak
  - platform: time
    at: input_datetime.tou_23_00_overnight
    variables:
      tariff: Overnight
action:
  - service: select.select_option
    target:
      entity_id: select.tou_em_channel_c_energy
    data:
      option: "{{ tariff }}"
mode: single

What my dashboard looks like in the real world. This is the most central location in the house (next to the fridge). I feel this does the following:

  • expansion of traditional/physical things and systems
  • quickly tells me what I need to know high-level on energy usage
  • gamification of mobile device’s charge status to raise awareness for my kids

2 Likes