Peak and Off Peak Consumption

Apologies if this is the wrong section, but it is energy related.
I am trying to set up the Energy Dashboard to show me my Peak and Off Peak usage, rather than just overall total for the day. I have found a few guides online and followed them through, but always get stuck at the last bit where you do the Energy Dashboard configuration and try to ‘Add Consumption’. At this point it never returns a result for me search of my entities.

I am not brilliant with HA but have been trying to work the problem.
I believe it is because the entity it creates does not have a ‘unit_of_measure’ line in it, but i cant work out how to add this.
The Helper is being created as a Utility Meter, as per the guides.

Below is the output i get when i check Developer Tools > States and look at the Attributes

state_class: total_increasing
source: sensor.grid_daily
status: paused
last_period: ‘0’
last_valid_state: None
meter_period: daily
cron pattern: 0 0 * * *
tariff: E7OffPeak
last_reset: ‘2023-04-14T12:01:17.619222+00:00’
icon: mdi:counter
friendly_name: Eco7 E7OffPeak

Any guidance would be appreciated, Thanks

You have the correct state_class but it still needs an energy device_class and a unit of Wh or kWh.

Hi Tom
This is the issue, how do i add those lines please?
I cant edit the entity under ‘entities’ and if i make a change under Developer Tools > States there is no way to save the change.

I am guessing perhaps i have to find the entry in a YAML file, but not sure which one or where its saved

TIA

Not sure how or why, but just been to check for the entry
device_class: energy
as i didnt know that was missing before, and it now seems to have updated itself to have the two lines.

state_class: total_increasing
source: sensor.grid_daily
status: paused
last_period: ‘0’
last_valid_state: None
meter_period: daily
cron pattern: 0 0 * * *
tariff: E7OffPeak
last_reset: ‘2023-04-14T12:01:17.619222+00:00’
unit_of_measurement: kWh
device_class: energy
icon: mdi:counter
friendly_name: Eco7 E7OffPeak

Can you see it in the energy dashboard now?

Hi Tom
Sorry, did see your reply. Yes it can be seen on the Energy Dashboard now. No idea why it suddenly added the extra lines and started to work

Thanks