Help with template sensor with nested json

I’m wanting to make a command line template sensor for smartctl which displays HDD data and can output in json format. smartctl --nocheck standby --json -x /dev/sda

Here is the json output:
https://pastebin.com/Bsbyx2Mx
you can paste the above into here to see the format:
http://jsonviewer.stack.hu/

Here is what I have done so far

sensor:
  - platform: command_line
    command: "smartctl --nocheck standby --json -x /dev/sda"
    value_template: "{{ value_json }}"
    
  - platform: template
    sensors:
      dev_sda_exit_status: 
        value_template: "{{ value_json.smartctl.exit_status }}"
      dev_sda_smart_status_passed:
        value_template: "{{ value_json.smart_status.passed }}"
      dev_sda_temperature_current:
        value_template:  "{{ value_json.temperature.current }}"

There is also another one I want to grab that is harder

ata_smart_atrributes -> table -> id = 5 ; raw_value = X

I can’t use

# ID 5
{{ value_json.ata_smart_attributes.table[4].raw.value }}
# ID 197
{{ value_json.ata_smart_attributes.table[14].raw.value }}

because I want the raw_value based on the ID=5 or ID=197 and not based on the entry number in the table (4 or 14)

Actually I can’t even get file sensor to work in home assistant.

YAML

homeassistant:
  whitelist_external_dirs:
    - /config/smartctl

sensor:
  - platform: file
    name: testone
    file_path: "/config/smartctl/test.json"
    value_template: '{{ value_json }}'
  - platform: file
    name: testtwo
    file_path: "/config/smartctl/test.json"
    value_template: "{{ value_json.test }}"

/config/smartctl/test.json

{
  "test": "hello world"
}

Proof that home assistant can read the test.json file

mike@server:~$ docker exec -it homeassistant bash
bash-5.0# cat /config/smartctl/test.json
{
  "test": "hello world"
}bash-5.0#

Unfortunately both the sensors are empty