Octopus energy - Spin the wheel - automatically!

Automatically spins the Octopus Energy Wheel of Fortune whenever spins are available (electricity or gas), and optionally records the last 10 wins with dates.

Import

Import blueprint

Or paste this URL into HA → Settings → Automations → Blueprints → Import:
https://raw.githubusercontent.com/SiriusSailing/ha-octopus-energy-blueprints/main/blueprints/octopus_energy_wheel_of_fortune.yaml

Requirements

Win tracking (optional)

Create an input_text helper (max length 255) and pass it to the blueprint — it stores the last 10 wins as JSON so you can display them on a dashboard.

Tip: Create two automations from this blueprint — one for the electricity sensor, one for gas.

Thanks for your comments - I haven’t engaged with blueprints before - and the frameworks around current dev environments baffle me (it’s been around 35 years since I coded professionally!). I’ll remove the post whilst I try and work out how to format it properly

2 Likes

is that better ?

1 Like

The automation errors out after the action to spin the wheel with:
Error: Script does not support 'response_variable' for service 'octopus_energy.spin_wheel_of_fortune' which does not support response data.

Thanks for reporting this — you’ve found a real bug in the blueprint.

What’s happening: The blueprint was using response_variable on the spin_wheel_of_fortune service call unconditionally (even when win history tracking is disabled). response_variable only works when the service declares it returns response data — and older versions of the Octopus Energy integration didn’t declare this. So if your integration is below the version that added that support, HA hard-errors before the spin runs.

Fix: I’ve restructured the blueprint so response_variable is only used when you’ve actually set a win history helper. If you leave that field blank, the service is called without it — no error, and the spin runs normally.

To get the fix: go to Settings → Automations → your Wheel of Fortune automation → the three-dot menu → Re-import blueprint (or delete and re-import from the source URL). If you’re not using win history tracking, you can also just leave the helper blank on re-import.

If you’re still seeing issues after updating, also make sure you’re on the latest version of the Octopus Energy integration via HACS.


Does this mean that any auto-spin of the wheel is now actually crediting wins as octoplus points to accounts?

Be a real plus if it is…

I’ll try this on Thursday, but I was/am running the latest version of the integration (18.3.3).

I believe it does - that was the intent :slight_smile: