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’) }}”
-