Skip to content

Cost Tracker Sensor(s)#

Ever wondered how much your individual appliances are costing you? You can create a cost tracker that monitors the consumption of an existing sensor and calculates the daily cost based on your tariff. You can also use these sensors to track the money you're making potentially from exports.

Info

The cost is only calculated when the monitored sensor changes. Therefore the accuracy of the cost tracker sensors is dependent on the frequency the monitored entity updates.

Setup#

After you've configured your account, you'll be able to configure cost tracker sensors. These are configured by adding subsequent instances of the integration going through the normal flow, and selecting Cost Tracker in the provided menu.

Name#

This is the unique name for the cost trackers

Meter#

This is the meter whose tariff will determine the rate the entity consumption is calculated at. This can be either an import or export based meter, meaning that you can track the money you're potentially making from your exports.

Entity#

This is the entity whose consumption should be tracked and the cost calculated against. This entity should be reporting in kwh.

Tracked entity state is accumulative#

This should be true if the tracked entity's state increases over time (true) or if it's the difference between updates (false).

Week sensor day reset#

This is the day of the week the accumulative week sensor should reset. This defaults to Monday.

Month sensor day reset#

This is the day of the month the accumulative month sensor should reset. This must be between 1 and 28 (inclusively). This defaults to the 1st.

Handling Exporting#

Due to everyone's HA setup being different for how they track importing/exporting, the sensors themselves assume that all consumption changes should be tracked and the cost calculated. However, you may wish to turn off tracking when you're exporting. This can be done via the related services.

Entities#

Cost sensor#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}

This is the total cost of the tracked entity for the current day.

This is in pounds and pence (e.g. 1.01 = £1.01).

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
is_tracking boolean Determines if the tracker is currently tracking consumption/cost data
tracked_changes array The collection of tracked entity changes where the costs have been tracked in 30 minute increments
untracked_changes array The collection of tracked entity changes where the costs have not been tracked in 30 minute increments
total_consumption float The total consumption that has been tracked for the current day

Each item within the tracked_changes and untracked_changes have the following attributes

Attribute Type Description
start datetime The date/time when the consumption starts
end datetime The date/time when the consumption ends
rate float The rate the consumption is charged at. This is in pounds and pence (e.g. 1.01 = £1.01)
consumption float The consumption value of the specified period
cost float The cost of the consumption at the specified rate. This is in pounds and pence (e.g. 1.01 = £1.01)

Cost sensor (Peak)#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_peak

This is the total cost of the tracked entity at peak rate for the current day. This is in pounds and pence (e.g. 1.01 = £1.01).

Note

This is disabled by default.

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
is_tracking boolean Determines if the tracker is currently tracking consumption/cost data
total_consumption float The total consumption that has been tracked for the current day at peak rate

Cost sensor (Off Peak)#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_off_peak

This is the total cost of the tracked entity at off peak rate for the current day. This is in pounds and pence (e.g. 1.01 = £1.01).

Note

This is disabled by default.

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
is_tracking boolean Determines if the tracker is currently tracking consumption/cost data
total_consumption float The total consumption that has been tracked for the current day at off peak rate

Week cost sensor#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_week

This is the total cost of the tracked entity for the current week. This will reset on the configured day.

This is in pounds and pence (e.g. 1.01 = £1.01).

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
accumulated_data array The collection of accumulated cost in daily increments
total_consumption float The total consumption that has been tracked for the current week

Each item within the accumulated_data has the following attributes

Attribute Type Description
start datetime The date/time when the consumption starts
end datetime The date/time when the consumption ends
consumption float The consumption value of the specified period
cost float The cost of the consumption at the specified rate. This is in pounds and pence (e.g. 1.01 = £1.01)

Week cost sensor (Peak)#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_week_peak

This is the total cost of the tracked entity at peak rate for the current week. This is in pounds and pence (e.g. 1.01 = £1.01).

Note

This is disabled by default.

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
total_consumption float The total consumption that has been tracked for the current week at peak rate

Week cost sensor (Off Peak)#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_week_off_peak

This is the total cost of the tracked entity at off peak rate for the current week. This is in pounds and pence (e.g. 1.01 = £1.01).

Note

This is disabled by default.

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
total_consumption float The total consumption that has been tracked for the current week at off peak rate

Month cost sensor#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_month

This is the total cost of the tracked entity for the current month. This will reset on the configured day.

This is in pounds and pence (e.g. 1.01 = £1.01).

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
accumulated_data array The collection of accumulated cost in daily increments
total_consumption float The total consumption that has been tracked for the current month

Each item within the accumulated_data has the following attributes

Attribute Type Description
start datetime The date/time when the consumption starts
end datetime The date/time when the consumption ends
consumption float The consumption value of the specified period
cost float The cost of the consumption at the specified rate. This is in pounds and pence (e.g. 1.01 = £1.01)

Month cost sensor (Peak)#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_month_peak

This is the total cost of the tracked entity at peak rate for the current month. This is in pounds and pence (e.g. 1.01 = £1.01).

Note

This is disabled by default.

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
total_consumption float The total consumption that has been tracked for the current month at peak rate

Month cost sensor (Off Peak)#

sensor.octopus_energy_cost_tracker_{{COST_TRACKER_NAME}}_month_off_peak

This is the total cost of the tracked entity at off peak rate for the current month. This is in pounds and pence (e.g. 1.01 = £1.01).

Note

This is disabled by default.

Attribute Type Description
name string The base name of the cost tracker (based on config)
mpan string The mpan of the meter that determines how the cost is calculated (based on config)
target_entity_id string The entity whose consumption data is being tracked (based on config)
entity_accumulative_value boolean Determines if the tracked entity has accumulative data (based on config)
account_id string The id of the account the cost tracker is for (based on config)
total_consumption float The total consumption that has been tracked for the current month at off peak rate

Services#

There are services available associated with cost tracker sensors. Please review them in the services doc.