Glow / Hildebrand Display - Local MQTT Access - Template Help

Followed the guide and code and when trying to add the Gas to the Energy dashboard I keep meeting this error. Any advice?

Read that and the next post. It is a bug in HA currently

1 Like

Hi, I was wondering if its possile to create some kind of graph that shows the updated usage (in kwh and or £) as often as it’s gathered from the IHD, every 6s or so. Looks like I’m only getting updates every 30mins for Electricity (I know this is the limitation for gas so not too bothered about that)

Thanks!

This is already happening. All the entities get the value exactly as you want it.
image

In my case it writes a new value roughly every 5 seconds

Struggling to get to the HA file: .storage/energy - is this in the file editor?

Because I do not know your setup I can’t give you precise info. Have a look at this thread. You will need a different way to access it, either SSH, terminal, VSCode (you need to remove .storage from excluded paths)

Thanks for the reply, after playing around I can see that the power and import are being provided every 6 seconds, but my cost is updating much less frequently:

I’ve got the same British Gas x L+G issue of reporting everything /1000 so added *1000 to the template (pending a meter firmware update - I’ll let everyone know if it happens after the 2 weeks I’ve been told it’ll take)

I’m using MQTT only and not the HACs repo

Any tips?

Costs are also instantaneous but rely on actual consumption for changes. It will basically update as often smart_meter_electricity_import_today does with the only caveat that the Cost Today is rounded to 2 decimals, so because the rounding might be the same value as the previous one, it may “appear” like it takes longer to update.

Your screenshot is a bit weird though, mine seems to update around 5-6 seconds. I have zoomed in a lot so you can see how often the graph is updated

Try to debug your values starting from smart_meter_electricity_import_today. If that updates slowly, then the cost will also update slowly. Then try to figure out why it updates slowly. e.g. is your mqtt connection stable, listen to the mqtt topic and see how often it updates. if that is also sporadic, then go one layer deeper into the onion :slight_smile: is the ihd dropping from your network, if that is not a problem, continuouly monitor the costs on your IHD, do they update sporadicaly.

Unfortunately the situation you are describing is not a limitation of my implementation, but rather sth at your end. Happy to try and assist you, but I might have limited feedback. The implementation works exactly as you described you want it to work :slight_smile:

Thanks, I checked the smart_meter_electricity_import_today and I’ve realised that it is out by a factor of 1000 and therefore only updating every now and again. I added the *1000 to the cost template, but I think a better solution would be to add the *1000 to the import today.

I’m not so good at building templates (only got into HA 2 weeks ago) would you be so kind to help me, please?

Thank you!

Have a look at this post:

I will also add this to the original post for ease of use of other new comers

Thanks, looks like this was exactly what I had done already. By *1000 to the costs it only reports when the import changes. But as the import is only 2 decimals it’s not updating properly.

Looks like I’ll just need to wait until my Smart Meter gets the upgraded firmware… If my British Gas experience has anything to tell, this won’t happen, and in a few weeks I’ll be calling them again to go over the whole thing again! TBC

Yep, that is correct, but at least the cost would be in accordance to the energy unit of measurement that is expected.

It won’t change how often it will update, because a factor of 1000 means you have to use a lot more energy for the small increments. The cost will be correct (with your multiplication by 1000), only that it updates less often at more “round” consumption values.

Hope this explains it better. My bad for not mentioning this from the start. Didn’t mean to give you false hope.

No worries, thanks for the explanation either way. I can at least be at peace with it for now :smiley:

1 Like

Hi,

I’m quite new to Home Assistant, so I may be wrong here,
But when I coped the the template sensor over, everything seemed to work, but the VSCode add-on highlighted the yaml with the error ‘Incorrect type. Expected “array”.’

After some Googling I was able to remove the error by changing the first few lines to be

template:
  - sensor:

instead of

template:
  sensor:

And again everything still worked, but the error is gone.

As I mentioned, I am relatively new to Home Assistant, so am not sure what the yaml formatting should be. Is my change valid?

Oh - also the post text says “You should now have 17 new entities.” but I only have 16. Am I correct that this text has not been updated following the removal of the “Smart Meter Gas: Power” entity in the October 17th update?

You are correct, 1 entity was decomissioned a while ago. Updated my post.

Yes your yaml is correct :slight_smile:

Also, check a few post up from here about a workaround to do with Gas in the energy dashboard. There is currently a bug in HA and the entity does not show up in the list.

Also, check a few post up from here about a workaround to do with Gas in the energy dashboard. There is currently a bug in HA and the entity does not show up in the list.

Cheers, that was going to be my next question :wink: once I’d checked I hadn’t messed up :slight_smile:

Greetings!

I am trying to debug something I’ve been seeing for a while but it has now bugged me too much to leave like that. My cost today on the dashboard for electricity and gas look good but on Sources, energy is good but gas is showing a very different price. For example, for today I have 3.48 for gas which looks good but on sources it says 6.27 which doesn’t really make much sense. I tried checking different things but couldn’t figure out where the source is coming from if not from the cost (today)?
Any help/hint is appreciated.

Thanks.

There are some posts above in this thread of the consumption not resetting at 12am, or resetting, then jumping to last night’s value, then back to zero again. Which as far as the energy dashboard is concercened this is a cost the is incurred. Have a look and you will see info on how to debug and workaround. In short check the consumption, if you see a drop to zero followed by an increase and a drop to zero you will need to adjust the template to disregard the weird value. Let me know what you find.

It is also on my todo list to use a different entity for the cost to avoid that, and i think it will be fine, but before i update the post i want to test it myself and have some findings.

1 Like

The ha bug where gas statistics could not be selected in the energy dashboard has now been fixed and released in the last ha version

1 Like

Thanks , Robert.
I will have a look tomorrow morning but just a quick check and at 1:30 ,gas was already at 4.08 which is Impossible.
I will let you know what I find!