#Dual Tarrif energy monitoring

1 messages · Page 1 of 1 (latest)

deft jungle
#

Is their a definitive tutorial about setting this up, ive tried twice and failed twice, of all the things ive done in HA this seems to be the hardest to pull off succesfully

ionic moon
#

Are you just trying to get a cost into the energy dashboard that is one of 2 values?
How does it change? Is it just time of day, or does it have weekends as a factor, national holidays etc

deft jungle
#

yeah time of day on peak and off peak, currewntly just getting one cost for the whole day

#

midnight till 7am off peak every day

ionic moon
#

Make a template sensor helper
{{0.1 if now() < today_at('07:00') else 0.5}}
Obviously change the 0.1/5 for whatever your off peak and normal rates are

deft jungle
#

being a new user to HA and only followed tutorials and simple instructional posts to get set up im not sure how or what that is, i think this is the problem im having with HA, its not very new user friendly, at times it feels like im learning c++

ionic moon
#

Settings > Devices and services > helpers tab > add helper > template > template a sensor

#

There's definitely a learning curve with some stuff in home assistant, "return a value that changes over time" is a somewhat awkward thing to achieve with base functionality, so it's easier to use a template imo
Still significantly easier than c++

deft jungle
#

yeah obviously not as difficult as learning a programming language haha but for someone like me who is new to the platform and bought a HA green box so im as base a level user can be in terms of knowledge it took me to get to this point in my HA journey its a big jump to start creating templates for sensors for a dual tarrif, something a LOT of people have at least here in the UK with our crazy energy costs. Ill give it a go later as the last tutorial i followed on this also set up templates etc but in the end none of it worked for me, as i say this is the only thing so far that ive been unable to do without resorting to discord for help

ionic moon
#

Who are you with? I have octopus and use the integration to pull the current cost live rather than having to set it up locally

#

Pretty sure eon and most others have equivalents

deft jungle
#

yeah im on eon drive 4v

#

v4*

#

i use fox ess integration for my battery and solar entities, all working great, this dual tarrif bit is the last piece of the puzzle for me

trim raptor
#

you can make a utility meter sensor, and an automation that sets the right tariff

#

so basically you end up with two sensors which you can add to the energy dashboard

#

please dont make template sensors for stuff which is already in HA

ionic moon
#

I never said it was the only way to do it, just the way I'd do it.
Utility meter + automation is workable, just messy. Your information gets scattered in half a dozen places (2 different sub-menu options for the costs, an automation for the trigger times and the utility meter bonus entities) which can make it harder to change things in the future when rates/times change. It's also more finicky, eg if HA misses a trigger to switch the rates (eg HA gets restarted at 6.59 and doesn't come back on till 7.00), you'll have a full day at completely incorrect rates
The only real advantage of that approach is it will give you your energy used within the (off) peak time periods as separate values

trim raptor
#

The real advantage is you don't need to write yaml

#

Also its easy to extend, just add more tariffs to your utility meter

ionic moon
#

And add triggers to the automation, and entities to the dashboard, vs just add an else if to a single template

#

Also templates are jinja. No yaml necessary

trim raptor
#

I consider templates to be an advanced user method

#

OP clearly doesn't want to use it

deft jungle
#

so is there a consesus on which method to use to set this up and could you point me to a tutorial or page that explains how to set it up? I checked the energy management documentation on the subject and it takes you so far with explaining what it is and shows a few examples of code but I still feel a bit lost as to how i do it. Im fairly computer literate and this one aspect of HA seems to be like a dark art to get working compared to all other aspects of HA ive come across

trim raptor
#

I could add it to the FAQ

deft jungle
#

yeah any help would be massively appreciated, like i said this is the final piece of the puzzle for me as i have everything else communicating and set up in my dash, but my energy costs are always off

robust junco
#

This is a full guide/tutorial on configuring Octopus Energy's smart tariffs (Cosy Octopus, Octopus Go, Intelligent Octopus Go, Octopus Flux and Intelligent Octopus Flux) into Home Assistant's Energy Dashboard. Full article with configurations here: https://www.speaktothegeek.co.uk/2024/03/octopus-smart-tariffs-and-home-assistants-energy-dashboar...

▶ Play video
#

This may help if I understand what is being asked ...

#

I've setup a multi tariff arrangement for my own solution..

deft jungle
#

yeah all im missing is the peak and off peak grid consumption, ill give that vid a watch and see if i have any luck, thanks!

trim raptor
#

I also added it to the FAQ, at the bottom: Energy FAQ

deft jungle
#

alias: Energy tariff selection
description: ""
triggers:

  • at: "07:00:00"
    variables:
    tariff: on peak
    trigger: time
  • at: "00:00:00"
    variables:
    tariff: off peak
    trigger: time
    conditions: []
    actions:
  • target:
    entity_id: select.multi_tariff_meter
    data:
    option: "{{ tariff }}"
    action: select.select_option
    mode: single
#

ive edited the yaml code to match the times and names chosen, does tghis get pasted into the configuration.YAML? as the FAQ says "copy into an automation" ??

deft jungle
#

is this where i add the on and off peak sensors? also where do i select the 2 tariff costs?

trim raptor
#

UI mode is just a different view of yaml mode basically

trim raptor
deft jungle
trim raptor
#

huh?

#

you created energy sensors

deft jungle
#

it will be because i havent done the automation part correct, i just added it onto my config yaml

trim raptor
#

not cost sensors

#

in the consumed energy field you fill in the tariff sensors created by the utility meter

#

in the static price field you fill in the cost per kwh

deft jungle
#

ill fix the yaml automation and see if it lets me do it then

#

right ive removed that code from my configuration.yaml

#

automation editor?

#

goto yaml mode?

#

as a newb im not sure what u mean here, i am here

#

as that is where i would imagine i should be to create an automation

#

im here in your instructions, as a new user i dont know what the instruction "copy paste the following YAML code into an automation:" means, as the only dealings ive had with YAML code previously was adding some lines to the configuration.YAML

#

i have the created sensors showing as expected in the helpers screen but when i search for them in that consumed energy drop down they dont show up

deft jungle
#

i just watched the video posted by @robust junco and it says the reason i cant select those entities is because they have to be left for 24 hours before they will show up in that drop down, this explains why i cant select them at the moment even though i followed the instructions you laid out, at least we know why now

#

This is a full guide/tutorial on configuring Octopus Energy's smart tariffs (Cosy Octopus, Octopus Go, Intelligent Octopus Go, Octopus Flux and Intelligent Octopus Flux) into Home Assistant's Energy Dashboard. Full article with configurations here: https://www.speaktothegeek.co.uk/2024/03/octopus-smart-tariffs-and-home-assistants-energy-dashboar...

▶ Play video
#

he mentions it in this section ive linked

trim raptor
#

no that's not true, the sensors show up immediately

deft jungle
#

ive copied that sensor name using the copy icon, then if i paste that into the consumed energy drop down nothing shows in the search, nothing shows if i search any part of that entity name ie peak

#

as you can see here, nothing appears under it in found entities with that name

#

if i try meter like you just shows some random tapo devices i have

#

the entity is working as expected too as its collecting data from my on peak usage currently

trim raptor
#

You need kWh, not kW

#

I think you input a power sensor into the utility meter and not an energy sensor

#

That's why it doesn't show up

deft jungle
#

that was it, u legend, id selected grid consumption power instead of grid consumption, soon as i sawpped it shows

deft jungle
#

is there any reason the off peak wont show? its showing kwh and using the same source as the on peak but its not letting me select like the other one did, initially thought it was because it wasnt collecting data yet but the automation switched it over at midnight and the graph shows its started poling data from the grid consumption entity now but still not showing in that drop down when i search for the entity

trim raptor
#

Could be a little bit fucked because the units are switched

#

Maybe there is a repair under dev tools -> statistics