Mqtt sensor goecharger not working

Hi all,

I am really struggling to get a mqtt sensor from a topic. I configured mosquitto to receive messages from goecharger and when I check the topic

go-eCharger/012345/status

within the moquitto integration

I can see the full json

{"version":"B","tme":"2905231419","rbc":"33"...}                                                

but when i configure a sensor like this

mqtt:
  sensor:
    - state_topic: "goecharger/012345/status"
      name: "Go-eCharger Status"
      unique_id: goe_status
      value_template: "{{ value }}"
      json_attributes_topic: "goecharger/012345/status"
      json_attributes_template: "{{ value_json }}"

i always get Status “unknown” of this sensor.
Already tried with different values for value_template/json_attributes_template like single json value etc. but nothing worked.
I definitely missed something, which I cannot figure out (also asked ChatGpt which did not help either).
Has someone this running and can give me a hint?

Your MQTT topic payload appers to be a JSON list of several individual key-value pairs, so you need to tell HASS which of the values you want.

Something like value_template: "{{ value_json.rbc }}".

If this helps, :heart: this post!

1 Like

Unfortunately, that does not work.

But your message brought me to carefully review this config. And it turns out, that i have just typoed the topic…
Working now.

mqtt:
  sensor:
    - name: "Go-eCharger Status"
      state_topic: "go-eCharger/012345/status"
      unique_id: goe_status
      value_template: "{{ value_json.car }}"