it’s just a matter of making a new yaml file in the packages folder called anything.yaml and pasting the text.
In short, Yes, you need the utility meters.
You could remove the tarrifs of the usage one and just have a single rate. You need at least two tarrifs for the demand one, being demand and no-demand periods.
You’ll have to edit the cost sensors to accommodate the changed entity names
Depending on what you find more challenging though, you don’t need to remove anything, as long as you set the peak shoulder and off peaks rates at the top to the same number and the high demand and low demand to the same number it will effectively be a single rate and minimal changes required to my package.
You won’t need that particular automation you quoted no. I have the same rate for peak off-peak and shoulder myself but agl still defines time windows so I decided to future proof the package in case I stop having a flat usage rate
Ahh yeah I see. Those aren’t really packages. They are just included files of each particular integration which happen to be located in a folder named packages.
You need this to make pakages the way I have
packages: !include_dir_named packages
But that would conflict with your existing setup.
So maybe make a new folder called package and put energy costs in there.
Really sorry mate, seems my guide had a typo. Just checked my own config and the first one needs to be plural packages, the second is whatever folder you make.
Then you should delete it from the energy_costs.yaml.
Not sure about the / actually. But your folder is called packages not package so try packages/ instead
If that doesnt work you almost certainly can use packages/agl_rates
Maybe rename agl_rates to packages and use packages/packages for the cleanest solution without requiring you to change the location of all your integration yaml files, and allow subsequent packages files to all be in that folder.
The error is because they need quotes around the number. I rewrote the whole package for this post and tried to clean it up also, guess those were mistaken by accident. I’ll correct it now in the OP too.
SgtBatten. have you considered to putting your code up on GitHub? It would make it much easier to see it all in one place, read it and also allow you to edit, with change tracking and ability to allow others to suggest changes and reject/approve them)?
For example, here’s the repository I recently setup to allow me to start putting up some integrations and ESPHome code (I still have to get time to edit those btw to allow friends to just add a single line in their esphome config for their gas/water meter and have it pull the latest code down and compile ready to flash).