Also note that it’s kWh with a capital W, and if this is your first top-level use of mqtt in your config, you will need to do a full restart to load it in.
Thanks Troon,
I did look at the official documentation and searched through the previous posts which is how I came up with the syntax. Not sure why I wasn’t getting an error about invalid config if the syntax was completely wrong.
So are you saying that the below should work? Do I have the right state_topic? Is that the correct way to get the value using value_json (I’ve seen value.json as well)?
It’s been almost two years since the official documentation showed the syntax you’ve used. I’m fully aware how misleading it can be to consider old forum posts as a source of information, though.
The syntax wasn’t invalid, you’re just referencing a sensor platform that doesn’t exist. I’d imagine there will be an error in your logs about this.