Home Assistant "MTA Service Status" python script

If you add it to configuration.yaml, it must start with sensor, try:

sensor:
  - platform: file
    name: Trains_123
    file_path: /config/data/MTA_LIRR_Status_data.json
    value_template: "{{ value_json['items'][0]['status'] }}"

If you already have sensor: section in a file, just add after any sensor:

  - platform: file
    name: Trains_123
    file_path: /config/data/MTA_LIRR_Status_data.json
    value_template: "{{ value_json['items'][0]['status'] }}"

also in customize.yaml you should have:

sensor.trains_babylon:
  custom_ui_state_card: state-card-custom-ui
  entity_picture: /local/icon/mta/mta.png
  friendly_name: 'Babylon'

You have to make sure you have proper indentation.