We are now going to add in the variable electricity tariffs. The process that we will use is tedious and can be done a lot quicker without setting up variables and editing YAML files. However, what will be produced will be easy to keep updated by anybody via the GUI, should times or prices change.
My tariff changes 6 times a day to 4 different tariffs.
- 02:00 Night Boost
- 05:00 Night
- 08:00 Day
- 17:00 Peak
- 19:00 Day
- 23:00 Night
To handle this we will first set up a utility meter with the 4 tariffs
- Day
- Peak
- Night
- NightBoost
Create a Utility Meter
Go to Settings

Devices and Services

Helpers

CREATE HELPER in the lower right.

Scroll down to Utility Meter and select.

Name it Utility Meter Tariff. Select the sensor myenergi My home Grid import today. Set the Meter reset cycle to Daily.

On the same screen we are going to add the name of the 4 tariffs.
In the Supported Tariffs

Enter day and press enter. Then do the same peak, night, nightboost and press enter.

You will now have all 4 entries. Click SUBMIT

You can then assign a location if you want and click Finish.

In your helpers you should now have them listed.

Create Helpers for storing Tariff costs
We will now add 6 helpers. 4 for the cost of electricity at each point, 1 for the export price, and 1 for the daily standing charge.
Click Create Helper.

Select Number

Enter Electrical Day Cost

Assign it a Euro sign. This is somewhat cosmetic but can help when you are looking through helpers to understand what it captures.

Select Input Field for Display Mode.
Set the Step Size to 0.001
Set the Unit of Measurement to EUR/kWh.
Click CREATE.

Follow the above steps 5 more time, with Create Helper, Number, etc and create
- Electricity Night Cost
- Electricity Peak Cost
- Electricity Night Boost Cost
- Electricity Export Cost
- Electricity Daily Standing Cost
You should now have these 6 entries.

Create Helpers for the times changes occur.
We are now going to create helpers that will store the 6 times the tariffs change throughout the day.
The 6 that we will create are
- Electricity Night Boost Tariff Start
- Electricity Moring Tariff Start
- Electricity Day Tariff Start
- Electricity Peak Tariff Start
- Electricity Evening Tariff Start
- Electricity Night Tariff Start
Click Create Helper

Click Date and/or time

Enter Electricity Night Boost Tariff Start in the name.

For the icon we will use mdi:clock-start.

We will select Time and then click Create.

Repeat the steps 5 more times to create all the time helpers.
You should now have the 6 entries.

Create Dashboard to update values
Now we are going to create a dashboard that will expose what we have created and allow updating of the values.
Click Settings.

Click Dashboards.

Click ADD DASHBOARD IN THE LOWER RIGHT.

Click New dashboard from scratch.

Enter Electricity Tariffs in the name and select an icon mdi:meter-electric-outline. Click CREATE.
On the left panel dashboards Electricity Tariffs should now be displayed. Click this link.

In the top right click the pencil edit button.

Click ADD CARD in the bottom right.

Select Entities.

By default Home Assistant will add in some Entities in the Entities (required). These can be deleted.

In the Title enter Electricity Tariffs.

Search for the entities and add them.
- Electricity Day Cost
- Electricity Night Cost
- Electricity Peak Cost
- Electricity Night Boost Cost
- Electricity Export Cost
- Electricity Daily Standing Cost

When completed you will have all 6 tariffs. You can arrange them as per your preference. Once complete, click SAVE.

You will now have the ability to add in the actual costs for each entity. Add in the values. Don’t forget if there is VAT calculate the real cost per KWh.

Now we will add the times to the same dashboard.
Click the pencil edit icon.

Click on ADD CARD.

Select Entities.

A similar screen to previous will be displayed. Delete the entities that have been auto populated.

In the Title enter Tariff Times.

Add in the 6 Start time entities and click SAVE.

Click Done.

You can now add the times for each change in the Dashboard.
You will now have a dashboard that will easily allow you to change the times or cost if your electricity provider changes them.

At this stage we have the costs, the times they are valid from, and a utility meter that will track them. In the next section we link them altogether to automate the changing of the tariffs and track the overall cost. Automating Tariff Changes.




