How to parse JSON to entity states?

Hi!

I have a remote device that I’ve configured to send me status information in a JSON string via MQTT. I’d like to parse selected fields to HA entity state but am not clear on how this maps. I have played in the Jijnja templates section so have a loose comprehension on structure, but I don’t understand how this maps to an entity value. For example:

The JSON could be: {"status": "active", "unnecessary_field", "value", "network_speed": 400, "unnecessary_field_2": "value2", "current_processes": 125} etc.

I’d like to create an entity (eg “server 1”) and then populate state. Is it something like:

- platform: mqtt
    name: "server1 Network speed"
    state_topic: remote/server1
    value_template: "{{ value_json.network_speed }}"

?

TIA.

Share the actual json data.

{"event": "status", "upload_protocol_rate": 6811, "max_upload": -1.0, "download_protocol_rate": 3301, "download_rate": 0, "has_incoming_connections": true, "num_connections": 14, "max_download": -1.0, "upload_rate": 0, "border_nodes": 0, "free_space": 7272801628160, "max_num_connections": 500, "file_count": 583}

There is no network_speed key in that data.

It was an example, Tom. For the purposes of the actual data, it could be download_rate.

mqtt:
  sensor:
    - name: "server1 Network speed"
      state_topic: remote/server1
      value_template: "{{ value_json.download_rate }}"
      unit_of_measurement: "MB/s" # or whatever it is.