Glow / Hildebrand Display - Local MQTT Access - Template Help

This looks fine

But this doesn’t

How strange, I just checked mine (been neglecting it recently) and mine is the same apart from both gas and electric are showing -ve. I also do not have any type of export, i.e. solar, batteries, etc…

1 Like

I disabled that entity as I found it unreliable and use the unit rate entity and usage entity instead and let HA work it out

Yes, I’ve had this for ages for both gas and electricity - it’s really annoying, I can’t see why it’s doing it, if i create a manual graph card to show the costs they look fine.

EDIT: I’ve also tried using the ‘current price as entity’ and ‘set fixed price’ options, both of which result in £0 cost being reported?

Hello all,

Just wondered if anyone has made a clever sensor that tracks export for today only?

The MQTT broker on the CAD only has a total export but wondered whether some clever calculations could track previous total export compared to new total export.

I haven’t fully thought the below in my head but just some ideas and I’m not a major coder either.

If 0000 then

Reset all variables to blank

If after 0001 and before 2359 then

Export_prev_value = reading
Export_new_value = reading
Export_diff_value = $Export_new_value - $Export_prev_value

Export_today_prev_total = value
Export_today_new_total = $Export_today_prev_total + $Export_diff_value

Hi, I don’t know if this topic is still live or not but I will post anyway…

I just got an IHD from Glow and it works well. I followed the setup and the information in this post to get it up and running with HA and all went well except the entities calculating cost for the day.

I added the template to create the sensors to capture cost for the day and added to the HA config and it works, in the sense that the entities are recognised but they have no values and never update. See attached pics.


Given that others have managed this everything should have worked, don’t know what I am doing wrong.

Help much appreciated…many thanks.

Hi,
This is the code used for mine that is working

name: "Smart Meter Electricity: Cost (Today)"
    unique_id: smart_meter_electricity_cost_today
    device_class: monetary
    unit_of_measurement: "GBP"
    state_class: "total_increasing"
    icon: mdi:cash
    state: "{{ (
        states('sensor.smart_meter_electricity_import_today') | float 
        * states('sensor.octopus_energy_electricity_current_rate') | float 
        + states('sensor.smart_meter_electricity_import_standing_charge') | float
      ) | round(2) }}"

Make sure your other state sensor names are correct is the main thing I can recommend.

Here is my code that works.
If you post your code on here someone will be able to help….


  - sensor:
    # Energy Costs
      - name: "Smart Meter Electricity: Cost (Today)"
        unique_id: smart_meter_electricity_cost_today
        device_class: monetary
        unit_of_measurement: "GBP"
        state_class: "total_increasing"
        icon: mdi:cash
        state: "{{ (
            states('sensor.smart_meter_electricity_import_today') | float 
            * states('sensor.smart_meter_electricity_import_unit_rate') | float 
            + states('sensor.smart_meter_electricity_import_standing_charge') | float
          ) | round(2) }}"
          
      - name: "Smart Meter Gas: Cost (Today)"
        unique_id: smart_meter_gas_cost_today
        device_class: monetary
        unit_of_measurement: "GBP"
        state_class: "total_increasing"
        icon: mdi:cash
        state: "{{ (
            states('sensor.smart_meter_gas_import_today') | float 
            * states('sensor.smart_meter_gas_import_unit_rate') | float 
            + states('sensor.smart_meter_gas_import_standing_charge') | float
          ) | round(2) }}"

Thanks Sealine and hassio. I see the code being the same in my install yet it doesn’t work. Let me have another look at it and see if I can get it sorted. I may be back…!

Okay, sorted! The setup further above in this thread posted by robertalexa is what I used as my setup - at least I thought I did. Actually I got it from elsewhere and it was different but not that I noticed. Where I saw a problem was the additional template by robertalexa calculating cost, but it didn’t work because the sensor entities didn’t exist in the configuration I had copied. It took me a while to find this out though but it is looking good now. So, thanks to those leaving some code for me to consider, it lead me on the right track to fix it. Cheers.

I am tring yo connect my Hildebrand Display to MQTT which is runnig in a docker container. Do I need to put mqtt:// before the ip address and all the ip address I put in from portainer do not work. What am I doing wrong?

Not sure what you are asking here sorry. I run mine in a Docker and just followed the set up guides from a Google search, I don’t recall having to put an IP Address anywhere. I will try to help if I can?

For me the display ask for the ip address of my mqtt server which is running in dicker

Are you talking about on the Hildebrand Glow screen?

I think I followed this tutorial or very similar:
https://m.youtube.com/watch?v=7tnKTNZd9Dc

yes the hildebrand glow screen, when i put in my ip address of my mqtt container it fails to connect. I do not no why. when i had mqtt installed as a addon in home assistant the glow screen connected to it perfectly.

OK, why not try going back to the method that worked? My Mqtt is an addon in Home Assistant.

I just checked my system and it is in a virtual machine, not docker, sorry for my confusion.
I think I was going to use docker but found issues so switched to a VM in my Synology NAS……