Help with File Sensor and a json File

I´m still trying to get a sensor which tells me, when a PC was last online. Nothing seems to survive an HA restart, so I gave the File Sensor a try but can´t get it to work right now:

It should work this way:

Powershell script creates a file with
get-computer-info | convertto-json > \\\config\info\$env:computername.json

The file is formatted like this:

    "OsBootDevice":  "\\Device\\HarddiskVolume2",
    "OsSystemDevice":  "\\Device\\HarddiskVolume4",
    "OsSystemDirectory":  "C:\\WINDOWS\\system32",
    "OsSystemDrive":  "C:",
    "OsWindowsDirectory":  "C:\\WINDOWS",
    "OsCountryCode":  "49",
    "OsCurrentTimeZone":  120,
    "OsLocaleID":  "0407",
    "OsLocale":  "de-DE",
    "OsLocalDateTime":  "\/Date(1624730214428)\/",
    "OsLastBootUpTime":  "\/Date(1624463894272)\/",

And this is part of the configuration.yaml for testing:
Not sure if the allowlist / whitelist part is correct that way.

    - /media
    - /config
    - /config/info
    - /config/info
    - /config
    - /media

  - platform: file
    name: pc-office last boot
    file_path: /config/info/pc-office.json
    value_template: '{{ value_json.OS_LastBootUpTime}}'

  - platform: file
    name: pc-office os build
    file_path: /config/info/pc-office.json
    value_template: '{{ value_json.OS_BuildNumber}}'

With this config, the sensor are all in an “unknown” state.
Any Ideas? Thanks for help



The file sensor platform reads the entries from a plain-text file and shows the found value. Only the last line of the file is used.