[GUIDE] Australian Electricity Demand tariffs (e.g AGL)

I’m glad it is now working.

Where did you read about this? I’ll edit the OP if I need to.

Thanks so much for all your help to get this going.

So to answer your question > Where did you read about this? I’ll edit the OP if I need to.

I did not read it anywhere, but decided to rethink this whole thing after making so many attempts to get this working like deleting the sensors making sure they were not present several full reboots atc. While this was all happening I was scanning through many forums for a solution as what was happening, each time I created the sensors and checked the history, entities the sensors get created perfectly and data collected for each sensor was correct, but each time I restarted HA it went back to loosing everything and also the daily sensor was also shown Off-peak when it was after 15:00 which should indicate Peak.

So back to the old fashion drawing board and thinking outside the normal. Made a document with bullets points on key parts of the OP post and this whole thread. Deleting the ones that were not relevant till I was left with a hand full. One that really stuck was.
• In your OP post you said that the automation was created via the UI (this you had highlighted in
this post a couple of times to questions raised and also told me about it.

• This bit yesterday was the icing on the cake [well if you do it manually it’s twice a day. 3pm to peak and 9pm to off-peak. But that’s what the automation is meant to do, and does do for your daily one (which is why it’s crazy that it’s not working) ]

• So I once again deleted all the hourly setting, did a full reboot waited an hour or so. Checked the daily config in yaml and found it showed Off-peak still.

• I deleted the automation part in energy_cost.yaml file and created the automation from the UI and ran it once. Went in and checked yaml services and “Hello” to my surprise it changed from Off-Peak to Peak which was right.

• Added my hourly sensors to energy_cost.yaml, added the line to the automation created earlier ran that once, saved the yaml file restarted HA and went in yaml setting and surprise both entries showed Peak.

• Did a full reboot of the system and its been rock solid.

So there you go, hence why I wrote my post up to help someone else and sharing our knowledge is the best thing ever. “Phew” solved…energy_hourly_display_24052023_working_at_11-35am
yaml_state_display
yaml_state_display_off-peak

I went looking last night and found a few anecdotal references to automations in yaml causing issues.

I do indeed have mine created via the UI and not actually in my own package. However, the documentation on packages specifically says automations work, so I never considered it could be problematic.

Like you I read a lot too and came across them, in fact one of the mods too said use the UI for automations.

As you had your automation setup via the UI this was also one of the bullet points I noted. I had to be doing something wrong here as try as I may just could not get it to work and it broke the daily setup too. I did not think of it much as I’m sure you would have read up on the document. But there you go it resolved everything now. Now thinking back this could have been my original issue too, apart from the cleanup you did on the code.

I thought I understood this demand charging thing but your demand charges seem really high. Isn’t that bill saying you use around 8.5-9.5 kW in one hour during the demand window? If that is correct then I understand how it works but if not……

they kind of reverse engineer the number.
So cloud would have used 4-5kWh in one 30 minute demand window. they extrapolate that to a kW value which gives the 8-10 values on the bill.

I agree it’s high usage in comparrison to my own also where i am targeting under 2kWh as worst day usage. That being said, my demand charges are more than double clouds so we pay a similar charge for each month.

I’ve recently moved off a demand plan back to TOU. was sick of micromanaging it.

1 Like

It’s the maximal average power during a 30-minute interval, not for a full hour.

It’s calculated by taking the energy consumed in kWh and dividing by the interval’s duration (half an hour).

So if the maximal consumption for all the 30-min intervals during the peak demand window for a month was 4 kWh, then demand for that month is 4 kWh / 0.5 hours = 8 kW.

Thanks that is my understanding. Those were just large numbers then!

I had that option but in. QLD the TOU charges are very high… So demand it is…

After a 60% increase by agl I went with globird for a much cheaper daily, cheaper shoulder and off-peak, slightly better FiT and slightly worse peak, but no demand.

Thanks. I do need to do more research but for now I have gone with AGL’s new EV plan so only 8c per kW between 0000-0600.

1 Like

I had a bit of a peak at the HA-Packages on Github, I’m by no means proficient in any of this, but from the energy_costs.yaml - does it need to be added to config.yaml or can it live in it’s own world/ file?

Also, how do you trigger peak/ off peak/ shoulder times? I’m tipping it’s mentioned in this thread? My solaredge inverter has an imported_energy sensor that is fairly accurate, but it doesn’t consider the time of use tariff.

I have questions as well about calculating the ROI/ solar payback also, but there’s another thread on that elsewhere, so i’ll save that for another space.

Pretty much everything you need is in the first post. The packages guide is right at the bottom.

From memory it is best to create the automations seperately

1 Like

I’ve gotten most of the way through the guide, but i’m now getting the error “Integration error: packages - Integration ‘packages’ not found.”

I’m using file editor in the UI and have saved energy_costs in a folder “packages” within config

packages aren’t part of the default config Packages - Home Assistant

Sorry man, you’re going to have to explain it to me like I’m 5. I’m still very new to this

Add this to configuration.yaml

homeassistant:
  packages: !include_dir_named packages

Ah yep, tried that, still getting the same error.

Tried both;
1.
homeassistant:
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
packages: !include_dir_named packages

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
packages: !include_dir_named packages

Thanks @OzGav

I’ve corrected the OP now too.

The indentation is critical.

Packages is indented under homeassistant.

The others aren’t.