Auth changes, Sunday Saver Auto Enrolment and various tweaks and bug fixes.
18.9.1 - Auth changes, Sunday Saver Auto Enrolment and various tweaks and bug fixes.
The stable release of the 18.9.1 line — this rolls up everything from the two 18.9.1 betas plus a batch of bug fixes.
Thanks to the beta testers for the rapid feedback enabling this to roll to a release version in record time.
This is the most substantive update to the library since I originally forked and modified it - all seems smooth in testing (and I've been using the substantial changes for over 2 weeks) - but (as ever) please raise issues on GitHub, or post on the Reddit sub if you spot anything unusual.
What's new
New API key authentication
The integration now authenticates with EDF using a long-lived API key and migrates existing setups over from the old refresh-token approach automatically. This removes the recurring ~7-day token expiry that meant having to reconfigure regularly. Nothing to do for existing users — the migration happens on upgrade.
Note until API keys are made available by EDF on their website the API key generated here would get overwritten by any other applications issuing one (so far there aren't any!) - if you wish to give access to another EDF app of some sort copy the existing API key from the EDF Energy Panel within Home Assistant to avoid hassle.
EDF intend to add an API key to Your Account in the near future - but their development teams do have pressing tasks to complete first.
Sunday Saver auto-enrolment
The integration will now automatically enrol your account in EDF's Sunday Saver challenge each month. The first time it does, you'll get a persistent notification in HA confirming it happened.
If you'd rather manage enrolment yourself, disable it in Settings → Integrations → EDF Energy → Reconfigure (look for "Automatically enrol in Sunday Saver"). You can then trigger enrolment manually with the new edf_energy.join_sunday_saver service or just sign up through the Your Account system on EDF's own site.
Sunday Saver enrolment status in the panel
The EDF Energy panel and the Sunday Saver start sensor now track whether your account is actually enrolled. Previously the panel showed "Awaiting" even for enrolled accounts when no session was scheduled — it now correctly shows "Enrolled" with a note that no session is scheduled yet.
World Cup extra time — bonus session instead of an extended window
When a knockout match goes to extra time, the integration used to stretch the original 2-hour free electricity window to 3 hours. It now creates a separate one-hour bonus session (kickoff+2h → kickoff+3h) instead. This was all hypothetical as it's not yet been needed (first knockout round match tonight).
In practice: you'll see the original two-hour session confirmed at kickoff as before. If the match goes to extra time, a second slot drops into the calendar and panel automatically — no restart needed. The total free electricity is the same (3 hours), but it now shows as two clean, distinct events.
The extended_for_extra_time attribute on the event sensors has been replaced with extra_time_session_start and extra_time_session_end (both null unless extra time is confirmed). Update any automations or templates that referenced the old attribute.
This all relies on third party data sources - so expect things may go wrong!
Free electricity event entity fix
event.edf_energy_*_free_electricity_session_events now fires every ~60 seconds, matching the upstream OctopusEnergy integration this is forked from. Previously it only fired when a new session was detected, which meant automations triggered by this entity wouldn't fire at session start — they'd fire days earlier when the match was first scheduled. This should fix automation compatibility for anyone who migrated setups from Octopus.
Bug fixes
Sunday Saver auto-enrolment notification
Auto-enrolment was working correctly in beta.1 but the confirmation notification was silently failing — accounts were being enrolled without any notification appearing. This is now fixed. If you weren't notified in beta.1, you're likely already enrolled; check is_enrolled on your Sunday Saver start sensor to confirm.
Off-peak sensor showed the wrong end time in the morning on Go Electric (#19)
On tariffs whose off-peak window crosses midnight (e.g. Go Electric's 23:00–06:00), the off-peak sensor showed a truncated end time first thing in the morning and only corrected itself once the next day's rates were published. It now falls back to the known window end when the next day's rates haven't landed yet, so it reads the full 23:00–06:00 straight away — no more mid-morning change churning automations. Thanks to @adamlc for the report.
Stale smart-charging slots left on the dashboard (#17)
Planned charging slots that never actually happened (the car was unplugged, or EDF dropped them) used to linger on the panel and the dispatches card looking as though they had completed. They're now shown with a red "Cancelled" badge instead, and their estimated kWh is dropped so it doesn't imply energy that never flowed. Thanks to @geekypenguin for the report.
Off-peak date picker now covers more history
The off-peak windows attribute that drives the date dropdown on the panel and card only exposed 7 days, even though 60 days of history are retained — so the picker only offered around 9 dates. It now exposes 21 days (~22 dates). This also fixes a long-standing issue where restoring the sensor on restart briefly dumped the entire history into the attribute, pushing it over Home Assistant's state attribute size limit.
Problems?
Either raise issues here, or join us over on Reddit: https://www.reddit.com/r/HomeAssistantEDF/
Opportunities to support the ongoing library development:
See Reddit thread here: https://www.reddit.com/r/HomeAssistantEDF/comments/1tulw39/ways_to_show_support_for_ongoing_development/
A few people have asked about becoming GitHub sponsors - I have to be approved/verified before that option can be added - it is in progress, but timescales could be anything from days to weeks it seems.