Ok, thank you. At first I didn’t realize that the light gray part was someting from another topic from someone with a similar problem so I thought you just reposted a question here.
The snippet you posted seemed to suggest I was using legacy mode? I don’t want to use legacy modes, so if you could point me to the modern way of doing this… . Moreover, I want to also use the “current energy consumption” value and it says here: https://developers.home-assistant.io/docs/core/entity/sensor/#properties that I then have to use device_class: power (and for the cumulative value device_class: energy, so, I could do what you suggest, but I’d really like to understand why my solution does not work, since I followed all the instructions.
I’ll test your solution now and report back.
Edit: I don’t have the line homeassistant: in my configuration, so do I add it under default_config:? Two spaces indented? When I do that, I still don’t have the sensor show up sadly.
I’m pretty sure by now it is related to the last_reset value, my TP_link hs110 shows up in the list. It probably has this value set somewhere (although it does not show up in the attributes available in developers tools).
Perhaps it is good to mention that my mqtt sensors do not have a “unique_id”, could that have anything to do with it?
Related, is state_class: measurement settable for rest sensors yet?
Seeing this error:
Invalid config for [sensor.rest]: [state_class] is an invalid option for [sensor.rest]. Check: sensor.rest->state_class. (See /config/configuration.yaml, line 582). Please check the docs at https://www.home-assistant.io/integrations/rest
I have a myenergi harvi to monitor the Grid CT and had hoped to use it for the new Energy dashboard
Ok, sorry for being such a noob but the first part of my config now looks like this:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
customize_glob:
sensor.*_energy:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
And I get the error:
Setup failed for customize_glob: Integration not found.
Edti: Ah, so maybe in the future it will work when they add support for “last_reset”
YEEESSS IT WORKS. Thank you. Indeed I already figured the last part out and changed the sensor name to end in “energy”. And indeed, I needed to add that homeassistant:
Indeed, I can add my gas usage when I alter the unit from m3 to kWh… I hope they start supporting m3 gas as well at some point! Actually gas is more relevant to me, I don’t see myself really using less electricity but gas I can see way to be smarter about it and adding isolation etc… Perhaps compute how much my house leaks energy by looking at gas usage as a function of outside temperature…
Some nice plot from peak usage etc (unit kW) would also be cool. But what we got is already really cool and there is a lot of potential, I’m really looking forward to new features in the future!
Note that even though the commented templates in my anchor are perfectly fine templates, they dont work in the mqtt config. No errors, simply no attribute is set for last_reset.