Skip to content

Services#

There are a few services available within this integration, which are detailed here.

Cost Trackers#

The following services are available if you have set up at least one cost tracker.

edf_energy.update_cost_tracker#

This service allows the user to turn the tracking on/off for a given cost tracker sensor.

Attribute Optional Description
target.entity_id no The name of the cost tracker sensor(s) whose configuration is to be updated.
data.is_tracking_enabled no Determines if tracking should be enabled (true) or disabled (false) for the specified cost trackers

Automation Example#

For automation examples, please refer to the available blueprints.

edf_energy.reset_cost_tracker#

Resets a given cost tracker sensor back to zero before it's normal reset time.

Attribute Optional Description
target.entity_id no The name of the cost tracker sensor(s) that should be reset.

edf_energy.adjust_accumulative_cost_tracker#

Allows you to adjust the cost/consumption for any given date recorded by an accumulative cost tracker sensor (e.g. week or month).

Attribute Optional Description
target.entity_id no The name of the cost tracker sensor(s) that should be updated (e.g. sensor.edf_energy_cost_tracker_{{COST_TRACKER_NAME}}_week or sensor.edf_energy_cost_tracker_{{COST_TRACKER_NAME}}_month).
data.date no The date of the data within the cost tracker to be adjusted.
data.consumption no The new consumption recorded against the specified date.
data.cost no The new cost recorded against the specified date.

edf_energy.adjust_cost_tracker#

Allows you to adjust the consumption for any given period recorded by a cost tracker sensor representing today.

Attribute Optional Description
target.entity_id no The name of the cost tracker sensor(s) that should be updated (e.g. sensor.edf_energy_cost_tracker_{{COST_TRACKER_NAME}}).
data.date no The date of the data within the cost tracker to be adjusted.
data.consumption no The new consumption recorded against the specified date.

Smart Charging#

The following services are available if you are on a Smart Charging tariff.

edf_energy.refresh_intelligent_dispatches#

Refreshes Smart Charging dispatches for a given account.

Info

This service is only available if you have switched to manual polling in your configuration.

Warning

This service can only be called once every minute to a maximum of 20 times per hour.

Attribute Optional Description
target.entity_id no The dispatching entity that you want to refresh the content for (e.g. binary_sensor.edf_energy_{{DEVICE_ID}}_intelligent_dispatching).

Automation Example#

For an automation example, please refer to the available blueprint.

edf_energy.get_point_in_time_intelligent_dispatch_history#

Retrieve the Smart Charging dispatch history which was active for a given point in time based on up to the last 48 hours of dispatches that have been captured locally. This can be used to determine why is dispatching or off peak might have turned on during a certain time period.

Info

The EDF Energy API doesn't provide historic dispatch information, so this information is stored locally as it changes. Therefore depending on how often your dispatch information refreshes, it can take a while for data to become available.

Note

The data that powers this service is available at config/.storage/edf_energy.intelligent_dispatches_history_{{DEVICE_ID}}

Attribute Optional Description
target.entity_id no The dispatching entity that you want to refresh the content for (e.g. binary_sensor.edf_energy_{{DEVICE_ID}}_intelligent_dispatching).
data.point_in_time no The point in time to get the historic dispatch information that was active at the time.

Sunday Saver#

edf_energy.join_sunday_saver#

Manually opt an account into the current month's Sunday Saver challenge. This is useful if you have disabled automatic enrolment and prefer to manage it yourself.

If the account is already enrolled, the service exits silently without making any changes. If enrolment succeeds, the Sunday Saver coordinator is refreshed immediately so the start and end sensors reflect the updated state.

Attribute Optional Description
data.account_id yes The EDF Energy account number to enrol (e.g. A-AAAA1111). If omitted, all configured accounts are enrolled.

Flextras#

edf_energy.join_flextras#

Joins an account to Flextras, EDF's rewards scheme, without opening the mobile app. Safe to run on an account that has previously opted out: bonus hours, tastecard and Power Perks registration all survive, though the registration date resets to the day of rejoining. On success the Flextras coordinator is refreshed so the membership entities update straight away.

Attribute Optional Description
data.account_id yes The EDF Energy account number to join (e.g. A-AAAA1111). If omitted, all configured accounts are joined.

Power Perks#

edf_energy.register_power_perks_session#

Records a Flextras Power Perks free electricity session so it appears in the free electricity calendar, the session sensors and the session events, exactly like a session picked up automatically.

EDF announce Power Perks sessions by SMS the day before and nowhere else, so the integration normally learns about them from a relay that parses the text (see tools/power_perks_relay in the repository). Use this action when a text could not be parsed, or if you are not using the relay. Registering a session with the same start time again replaces the earlier one.

Attribute Optional Description
data.start no When the free electricity starts (e.g. 2026-09-19 04:00:00). Local time unless a timezone offset is given.
data.end no When the free electricity ends. Must be after start and within 24 hours of it.
data.account_id yes The EDF Energy account number to register the session against. If omitted, it is registered for all configured accounts.

Miscellaneous#

edf_energy.purge_invalid_external_statistic_ids#

For removing all external statistics that are associated with meters that don't have an active tariff. This is useful if you've been using the integration and obtained new smart meters.

edf_energy.refresh_previous_consumption_data#

For refreshing the consumption/cost information for a given previous consumption entity. This is useful when you've just installed the integration and want old data brought in or a previous consumption sensor fails to import (e.g. data becomes available outside of the configured offset). The service will raise a notification when the refreshing starts and finishes.

This service is only available for the following sensors

  • sensor.edf_energy_electricity_{{METER_SERIAL_NUMBER}}_{{MPAN_NUMBER}}_previous_accumulative_consumption (this will populate both consumption and cost)
  • sensor.edf_energy_gas_{{METER_SERIAL_NUMBER}}_{{MPRN_NUMBER}}_previous_accumulative_consumption_m3 (this will populate both consumption and cost for both m3 and kwh)

Information

Due to limitations with Home Assistant entities, this service will only refresh data for the associated statistic ids used for the recommended approach in the energy dashboard. This will not update the history of the entities themselves.

Warning

If you are on a Smart Charging tariff, the cost data will not be correct for charges outside of the normal off peak times. This is because this data isn't available.