More info about Tariffs

I would like to set up tariffs for my energy integration. Unfortunately, I can’t seem to understand the docs that are available.

My situation is that the first X Kwh/day is charged at rate Y, and the remainder is charged at rate Z.

(Y and Z are also date dependent, but I’ll settle for constant values for now.)

How would I set up the tariff for my situation?

Set up a utility meter with two tariffs. This will create two sensors to track the different amounts for each tariff and a select entity you can use to switch between the tariffs.

Switch the tariffs using an automation. Trigger on the used daily energy (numeric state trigger) and use the select select-option action to set the required tariff.

There is an example here: Utility Meter - Home Assistant