Localvolts API energy retailer Australia

I rencently switched from Amber Electric to Localvolts. So far very happy with true 5min wholesale market access compared to Ambers 30min partially hedged market access. This broke all my automation and Localvolts doesn’t have an integration, and im dumb and it took me many hours so I will share it here.

Template:

  • platform: rest
    resource: https://api.localvolts.com/v1/customer/interval?NMI=*
    name: localvolts
    value_template: >
    {{ value_json[0].earningsFlexUp }}
    headers:
    Authorization: “apikey APIKEYPASTEDHERE”
    partner: “PARTNER CODE HERE”
    json_attributes:
    • earningsFlexUp
    • earningsFlexDown
    • costsFlexUp
    • costsFlexDown
    • costsAllVarRate
    • earningsAllVarRate
    • quality
      scan_interval: 10

Sensors:

template:

  • sensor:
    # Data from localvolts
    • name: “local_volts_earnings_flex_up”
      device_class: energy
      state_class: measurement
      state: “{{ state_attr(‘sensor.localvolts’, ‘earningsFlexUp’) | float }}”
      unit_of_measurement: “¢/kWh”

    • name: “local_volts_earnings_flex_down”
      device_class: energy
      state_class: measurement
      state: “{{ state_attr(‘sensor.localvolts’, ‘earningsFlexDown’) | float }}”
      unit_of_measurement: “¢/kWh”

    • name: “local_volts_costs_flex_up”
      device_class: energy
      state_class: measurement
      state: “{{ state_attr(‘sensor.localvolts’, ‘costsFlexUp’) | float }}”
      unit_of_measurement: “¢/kWh”

    • name: “local_volts_costs_flex_down”
      device_class: energy
      state_class: measurement
      state: “{{ state_attr(‘sensor.localvolts’, ‘costsFlexDown’) | float }}”
      unit_of_measurement: “¢/kWh”

    • name: “local_volts_costs_all_var_rate”
      device_class: energy
      state_class: measurement
      state: “{{ state_attr(‘sensor.localvolts’, ‘costsAllVarRate’) | float }}”
      unit_of_measurement: “¢/kWh”

    • name: “local_volts_earnings_all_var_rate”
      device_class: energy
      state_class: measurement
      state: “{{ state_attr(‘sensor.localvolts’, ‘earningsAllVarRate’) | float }}”
      unit_of_measurement: “¢/kWh”

    • name: “local_volts_quality”
      state: “{{ state_attr(‘sensor.localvolts’, ‘quality’) }}”

1 Like

costFlexUp is the change in cents per kWh if you increase load
earningsFlexUp is the change in cents per kWh if you increase export

This gives you the number so it can be graphed and used in automation

Interesting, i’m using Amber with EMHASS and was looking at localvolts for befinits of accessing 5min pricing intervals.

How do you go about buying and selling on localvolts?

Are to able to screenshot the raw data you get from the api?

You might find this useful:

I use EMHASS as well - great tool. When it comes to selling are folks using their solar forecast and/or battery forecasts to dynamically adjust their bids on the Localvolts market? It seems more involved than Amber where you just export/import and get the spot price passthru.

For example if I wanted to sell a chunk of energy every day to my dad for a fixed low usage rate, should I use forecasts to attempt to calculate a bid each day?

Has anyone worked out how to do future calls like ambers?

The flex up values i see in the api programs all show a live value more so then future.

Im using this github program mentioned but its not for forcast.