Smart home
Renewably's prices and cheapest times in the things your home already has – a tablet, a voice assistant, Home Assistant, a car charger or a battery – for Octopus Agile in East Midlands.
On a tariff whose price changes through the day, the saving comes from using electricity at the right times – and it's easier when your home does that for you: the hot water, the car or the battery waits for the cheap hours and stays off at the 4pm–7pm peak, without you checking the prices each day.
Everything here reads Renewably's public API: free, with no key and nothing to sign up to. Nothing reaches your devices or accounts; what you do with the numbers is up to you.
Nothing to set up
For anyone: open a page, or ask an AI assistant you already use.
Widgets
Full-screen views for a tablet on the wall, a smart home panel or a Home Assistant dashboard, for Octopus Agile in East Midlands. Each keeps itself up to date, with nothing to install or sign in to.
- Prices: the cheapest time and the next 24 hours' prices
- Appliances: tonight's start times for the dishwasher, washing machine and tumble dryer
- Car charging: tonight's charging times for a typical car and a 7 kW charger
- Carbon: the greenest time and the next 24 hours' carbon intensity
These show the three commonest appliances and a typical car; to show your own, set them up on the Appliances and EV pages and open their widgets from there.
ChatGPT and Claude
Ask in voice mode or by typing – "when should I run my dishwasher tonight in East Midlands?". Add Renewably as a custom connector with this address:
https://renewably.uk/mcp
More in the API docs.
Voice assistants
For a phone or a smart speaker: ask out loud whether now's a good time to use electricity, when it's greenest, when to run the dishwasher or charge the car, whether there's a Saving Session, what exporting pays or what your battery should do.
Siri – iPhone, iPad and HomePod
Add a shortcut and it asks a few questions. Answer:
- Region:
east-midlands - Tariff:
agile - Hours (appliance and car only): how long it runs, such as
2 - Export tariff (exporting only):
agile-outgoing - Battery (battery only): its size in kWh, such as
10, and how fast it charges in kW, such as3
Not your region or tariff? Change them at the top of the page.
Is now a good time to use electricity
The price now, and the cheapest hour ahead.
"Hey Siri, is now a good time to use electricity?"
When's the greenest time to use electricity
How green the grid is now, and the greenest hour ahead.
"Hey Siri, when's the greenest time to use electricity?"
What time should I run the appliance
The cheapest time to run the washing machine, dishwasher or anything else, and the delay to set.
"Hey Siri, what time should I run the appliance?"
What time should I charge the car
The cheapest hours to charge the car before 07:00.
"Hey Siri, what time should I charge the car?"
Is there a Saving Session today
Whether the grid is asking homes to use less or more today or tomorrow.
"Hey Siri, is there a Saving Session today?"
What does exporting pay now
What exporting pays now, and when it pays most.
"Hey Siri, what does exporting pay now?"
What should my battery do
What to set a home battery to now, and next.
"Hey Siri, what should my battery do?"
If Siri doesn't run it
- Run it once by tapping it in the Shortcuts app, and choose Always Allow when it asks to connect to renewably.uk.
- Say the name as written – Siri runs a shortcut when you say its name. If Siri answers the question itself instead, rename the shortcut with a word only you'd use, like "Renewably price". Avoid "timer" in a name: Siri starts a countdown.
- On a HomePod: in the Home app turn on Recognise My Voice and Personal Requests, and in Find My make sure your iPhone is My Location – the HomePod runs your shortcuts through it.
Each shortcut asks Renewably's API for one sentence and reads it out. Nothing is stored about you.
Alexa – Echo speakers and the Alexa app
An Alexa skill is on its way. Until then, Home Assistant (below) can answer through an Echo too.
Home Assistant
For a home running Home Assistant: copy a set-up into its configuration, as it is.
Voice, through Assist – and Google Home
Google doesn't let other services add voice commands to Google Home or Nest speakers, but Home Assistant can: its own Assist voice, its voice devices and the speakers it's connected to. Two steps, with your region and tariff already filled in.
1. Create custom_sentences/en/renewably.yaml in your Home Assistant configuration folder:
Show the set-up
language: "en"
intents:
RenewablyPrice:
data:
- sentences:
- "is now a good time to use electricity"
- "what's the electricity price"
RenewablyGreenest:
data:
- sentences:
- "when's the greenest time to use electricity"
RenewablyAppliance:
data:
- sentences:
- "when should I run the dishwasher"
- "when should I run the washing machine"
RenewablyCar:
data:
- sentences:
- "when should I charge the car"
RenewablyFlexibility:
data:
- sentences:
- "is there a saving session today"
- "is the grid asking us to use less electricity"
RenewablyBattery:
data:
- sentences:
- "what should my battery do"
- "what should the battery do"
2. Add this to configuration.yaml, then restart Home Assistant:
Show the set-up
rest_command:
renewably:
url: "https://renewably.uk/api/v1/say?ask={{ ask }}®ion=east-midlands&tariff=agile&hours={{ hours }}"
# Your battery: put its size (kWh) and charge rate (kW) and your home's use a year (kWh) in the address.
renewably_battery:
url: "https://renewably.uk/api/v1/say?ask=battery®ion=east-midlands&tariff=agile&battery=10&rate=3&usage=2500"
intent_script:
RenewablyPrice:
action:
- action: rest_command.renewably
data: { ask: price, hours: 2 }
response_variable: answer
- stop: ""
response_variable: answer
speech:
text: "{{ action_response.content }}"
RenewablyGreenest:
action:
- action: rest_command.renewably
data: { ask: greenest, hours: 2 }
response_variable: answer
- stop: ""
response_variable: answer
speech:
text: "{{ action_response.content }}"
RenewablyAppliance:
action:
- action: rest_command.renewably
data: { ask: appliance, hours: 2 }
response_variable: answer
- stop: ""
response_variable: answer
speech:
text: "{{ action_response.content }}"
RenewablyCar:
action:
- action: rest_command.renewably
data: { ask: car, hours: 4 }
response_variable: answer
- stop: ""
response_variable: answer
speech:
text: "{{ action_response.content }}"
RenewablyFlexibility:
action:
- action: rest_command.renewably
data: { ask: flexibility, hours: 2 }
response_variable: answer
- stop: ""
response_variable: answer
speech:
text: "{{ action_response.content }}"
RenewablyBattery:
action:
- action: rest_command.renewably_battery
data: { ask: battery, hours: 2 }
response_variable: answer
- stop: ""
response_variable: answer
speech:
text: "{{ action_response.content }}"
Then ask Assist "is now a good time to use electricity?". To change how long the dishwasher or car runs, change the number after hours:; for "what should my battery do?", put your battery's size and charge rate in its address.
Prices and the cheapest times
Home Assistant can switch things on when electricity is cheap and off when it isn't – a dehumidifier on a smart plug, the immersion heater on a smart switch an electrician has fitted, a heat pump's boost, a dishwasher that waits – and tell you when the grid is asking homes to use less, or more. These sensors give it the price now, the day's prices for a chart, and the cheapest three hours.
Add this to configuration.yaml, then restart Home Assistant. If the file already has a rest: or template: section, put these entries under the one that's there: each can appear only once.
Show the set-up
rest:
# The price now, with the rest of today's and tomorrow's half hours as an attribute (for charts).
- resource: https://renewably.uk/api/v1/prices?region=east-midlands&tariff=agile&days=2
scan_interval: 900
sensor:
- name: Renewably price now
unique_id: renewably_price_now
unit_of_measurement: "p/kWh"
state_class: measurement
# Unavailable, not an error, when there's no price for now (an outage, a gap in a supplier's prices).
availability: >-
{% set ns = namespace(ok=false) %}
{% if value_json is mapping and value_json.slots is defined %}
{% for slot in value_json.slots %}
{% if as_datetime(slot.start) <= now() < as_datetime(slot.end) and slot.price_p_per_kwh is not none %}{% set ns.ok = true %}{% endif %}
{% endfor %}
{% endif %}
{{ ns.ok }}
# With solar panels in the address, what a kWh costs with them.
value_template: >-
{% set ns = namespace(price=none) %}
{% for slot in value_json.slots %}
{% if as_datetime(slot.start) <= now() < as_datetime(slot.end) %}{% set ns.price = slot.with_panels_p_per_kwh if slot.with_panels_p_per_kwh is defined and slot.with_panels_p_per_kwh is not none else slot.price_p_per_kwh %}{% endif %}
{% endfor %}
{{ ns.price }}
json_attributes:
- published_until
- slots
# The cheapest three hours before 7am - for a dishwasher, an immersion heater, a smart plug.
- resource: https://renewably.uk/api/v1/cheapest-window?region=east-midlands&tariff=agile&duration_hours=3&finish_by=07:00
scan_interval: 900
sensor:
- name: Renewably cheapest 3 hours start
unique_id: renewably_cheapest_start
device_class: timestamp
availability: "{{ value_json is mapping and value_json.window is defined }}"
value_template: "{{ value_json.window.start }}"
json_attributes_path: "$.window"
json_attributes:
- end
- average_p_per_kwh
- includes_estimates
# NESO's flexibility events here - and who they pay (the note).
- resource: https://renewably.uk/api/v1/flexibility-events?region=east-midlands
scan_interval: 900
sensor:
- name: Renewably grid flexibility
unique_id: renewably_grid_flexibility
availability: "{{ value_json is mapping and value_json.events is defined }}"
value_template: >-
{% set ns = namespace(now_='none') %}
{% for e in value_json.events %}
{% if as_datetime(e.start) <= now() < as_datetime(e.end) %}{% set ns.now_ = 'use ' ~ e.direction %}{% endif %}
{% endfor %}
{{ ns.now_ }}
json_attributes:
- events
- note
template:
- binary_sensor:
- name: Renewably cheapest 3 hours now
unique_id: renewably_cheapest_now
availability: "{{ has_value('sensor.renewably_cheapest_3_hours_start') }}"
state: >-
{% set start = states('sensor.renewably_cheapest_3_hours_start') | as_datetime(none) %}
{% set end = state_attr('sensor.renewably_cheapest_3_hours_start', 'end') | as_datetime(none) %}
{{ start is not none and end is not none and start <= now() < end }}
It makes:
sensor.renewably_price_now: the price now, in p/kWh (with your panels, what a kWh costs with them), with today's and tomorrow's half hours as its slots attributesensor.renewably_cheapest_3_hours_start: when the cheapest three hours before 7am start (its end and average price as attributes)binary_sensor.renewably_cheapest_3_hours_now: on during those three hours – the one to trigger a smart plug or an immersion heater withsensor.renewably_grid_flexibility: "use less" or "use more" while NESO is asking homes here to, else "none" – with the events, and who they pay, as attributes
Each checks every 15 minutes. Flexibility events only pay through a scheme with your supplier or another provider – the sensor's note says so too. About them
A home battery's plan
With a home battery, these two sensors give Home Assistant the Battery tab's plan: when to charge it from the grid, when to hold it, when to let it run the house and when to export from it, to the end of tomorrow. Renewably doesn't run your battery: your own automations can follow sensor.renewably_battery_action through your inverter's integration, or you can just look.
Put your battery's size, its charge rate and your home's use a year in the address, and your battery's charge sensor where it says sensor.battery_state_of_charge, so the plan starts from where the battery is. Add it under the same rest: section as above.
Show the set-up
rest:
# Your battery's plan to the end of tomorrow. Put your battery's size (kWh) and charge rate (kW) and your home's
# use a year (kWh) in the address, and your battery's charge sensor in place of sensor.battery_state_of_charge.
- resource_template: >-
https://renewably.uk/api/v1/battery-plan?region=east-midlands&tariff=agile&battery=10&rate=3&usage=2500{% set soc = states('sensor.battery_state_of_charge') %}{% if soc | is_number %}&soc={{ soc | float | round(0) | int }}{% endif %}
scan_interval: 900
sensor:
- name: Renewably battery action
unique_id: renewably_battery_action
availability: "{{ value_json is mapping and value_json.now is defined and value_json.now is not none }}"
value_template: "{{ value_json.now.action }}"
json_attributes_path: "$.now"
json_attributes:
- target_pct
- soc_pct
- end
- import_p_per_kwh
- export_p_per_kwh
- name: Renewably battery settings
unique_id: renewably_battery_settings
availability: "{{ value_json is mapping and value_json.settings is defined }}"
value_template: "{{ value_json.settings | count }}"
json_attributes:
- settings
- summaryIt makes:
sensor.renewably_battery_action: what to set the battery to now – charge, hold, self_use, export or sun_to_grid – with the charge's target or the export's floor (target_pct) and how full it should be by the end of the half hoursensor.renewably_battery_settings: how many settings the plan has to the end of tomorrow, with each one (when, what, to what per cent, at what price) and what the plan saves as attributes
They check every 15 minutes. The plan is for a typical home of that size, and it changes as the prices and the sunshine forecast do.
Car and battery software
For a home already running evcc or Predbat: give it Renewably's prices, for tariffs Octopus's own feed doesn't cover.
evcc
For a home with an electric car, charging is often most of the bill. evcc charges the car in the cheapest – or greenest – hours before you need it: this gives it Renewably's prices for your tariff and, from NESO, your region's carbon forecast. Put this in evcc.yaml in place of its tariffs: section (or just its grid tariff), then restart evcc. evcc tariff lists the prices it now has.
Show the set-up
tariffs:
currency: GBP
grid:
type: custom
forecast:
source: http
uri: https://renewably.uk/api/v1/unit-rates?region=east-midlands&tariff=agile
jq: '[.results[] | {start: .valid_from, end: .valid_to, value: (.value_inc_vat / 100)}] | sort_by(.start) | tojson'
co2:
type: template
template: ngeso
region: 9
That's published prices only – to 11pm tomorrow once Octopus publishes them, around 4pm. To plan further ahead on Renewably's estimates, a guide that's usually within a few pence per kWh of what Octopus later publishes, add &estimates=true to the uri.
Predbat
Predbat plans when a home battery charges and when it runs the house, around the prices and your solar. Renewably gives it your tariff's prices in the same form as Octopus's own – EDF's and E.ON's tariffs as well as Octopus's. In apps.yaml:
rates_import_octopus_url: "https://renewably.uk/api/v1/unit-rates?region=east-midlands&tariff=agile"
Something else? Everything here comes from the Renewably API. If a set-up stops working, please tell me: hello@renewably.uk.