I have updated my post, I have made a typo because initially i did the template for the gasmeter, and then manually modified. My brain was on auto pilot. Good spot!
You are very welcome. Trying to give back to others just like others gave to me
Thank you, 6,500Km in 20 days. I might need another holiday when i come back from holiday LOL
I’m getting the error shown here when I attempt to add the GAS cost - do I just need to alter the unit of measurement in the template? (but if so why isn’t anybody else saying there’s an issue!)
@ianfretwell Can you please confirm this is what you have selected, including choosing the correct cost option - Use an entity tracking the total cost.
@si458 The energy dashboard can take up to 2 hours to start displaying information, in my case it was shorter than that, but more than 30 minutes. Also, your error suggests that you have used the Import Today entity, which is not what I have advised. Choose the Import (simple one) as that is cumulative and does not reset every day. HA will figure it out of how much it changes over time
Ahh - entirely my own fault there then - wrong cost option!
On a different note I’d like to be able to get things like the rssi value out as a sensor too but I can’t seem to make this work (all I’ve done is try to reverse engineer your work but apply it to the state values from MQTT instead) :
By the way, did you know you can replicate the Energy dashboard in lovelace? So then you can remove it from the sidebar and have everything nicely done in lovelave?
I have just updated my original post at the top with a screenshot and the YAML. Enjoy
@ianfretwell your state_topic is wrong Should be state_topic: "glow/REDACTED/STATE". Then han comes from the value_template as per the MQTT output I posted. I am sure it was just a fluke at your end and you would have realised this eventually
@robertalexa many thanks for your hard work on this !. One question when I set this up should I expect to see my entire gas / electricity usage to date on the HA energy stats page?
Could someone help me? I’m a real noob when it comes to MQTT, however I’m scratching my head because ive followed all the steps I’m seeing and my broker is not picking up anything from the display. I know that its connecting as when I turn the broker on and off it shows connection failed and connected. What does the topic need to be on the display? Where might I be going wrong? Thanks
My CAD was left at the default topic of glow. I just needed to pop in the ip of mosquito and the un/pw.
I would recommend MQTT Explorer on your PC, and you can then peek into Mosquito (if that is what you are using, a useful mqtt troubleshooting tool) to check that the messages are being processed as expected.
So ive left it as default of glow and added my ip address, username and password, and it says connected, but on HA its not showing anything being published to Mosquito. I added in the config on yaml, and the sensor text show in entities but nothing is attached to the sensors.
Have a look at your Import entities and send me their history. I had the same problem because i had 2 drops to 0 and then they came back up. So that doubled my meter. There is a fix for that already in the code above, posted a few days ago though
Its not doubling my meter readings due to drops it just that selecting Smart Meter Electricity import gives my entire usage since I had the smart meter installed ;
@jernauH The Energy dashboard is different to the actual entity. Energy measures the difference between 2 time points. If at the start of the day the Import entity had a value of 0, and then it has a value of 22000, then Energy will say that you have used 22000 kwh for the day.
Hope that makes sense. I assume something went wrong went you first set it up, so wait till tomorrow and see how it appears, then we can go from there, but I expect it will be fine.
Looking at your Import history though, that drop will create an issue in Energy, tomorrow I will try to update the entities to try to avoid problems with that.
@robertalexa@OriginUnknown thanks for your help, what i had done is used the wrong ID in the redacted, rather than the CAD ID i used the meter ID. I can now see values
My apologies I think it must have been the way I added the new entities to energy monitoring as previously I was running the glow integration. After completely deleting the entities from the energy config and then re-adding it looks like the data is now being displayed correctly. Again thanks for your work on this !
I am getting a strange cost reading for my Gas in the energy tab - its not including the standing charge yet the entity in HA is showing the correct value. Electric is fine.
This is awesome - I just received my Glow IHD and connected to my local MQTT. I have written two HA integrations before so I’ll take a look at converting your awesome mqtt configs into a proper HACS integration soon!
UPDATE: I’ve created a basic integration - I still can’t group by device and needs configuration.yaml edits but it’s a start. Please test and let me know!
UPDATE 2: I’ve added the config flow code so can now be setup like any other home assistant integration and groups all entities into a single device - you don’t even need to know your device ID.