Data import from Excel/Sheet/CSV for RFID card codes

Hi there,
Is there a way to import a dataset from an Excel file in the network or a Google Sheet into Home Assistant?

I am aware of the Google Sheets integration, but all I could find was how to export data to the sheet, not the other way around.

The project I want to use this for is an access control panel where people can present their RFID card and a gate opens. Since there are around a 150 RFID cards that are valid and the list changes quite often it is not practical to list them all in HA directly. I would rather have them in some external file where people who don’t have access to the HA Settings can also add or remove RFID codes.

The Hardware is an ESP32 with an RFID reader running ESPHome which exposes a text sensor in HA with the RFID code, this all works fine so far.

I’m also absolutely open to other creative solutions :slight_smile:


I am actually looking to do something similar. I’d like to download my solar data into Google sheets and then somehow import that into Home Assistant creating values that I can then put into the Energy dashboard.

I ended up using the google sheets node in NodeRed to check is the value reportet by my rfid reader is showing up in the spreadsheet.
For me the GSheet Node worked just fine node-red-contrib-google-sheets (node) - Node-RED
I would have preferred a solution directly in HA but this is fine for now…

See here for using JQ to parse CSV.

1 Like

This is a great solution. I’ll definitely try it.

Thank you. I tried reading google sheets. Works great.

  - sensor: 
      scan_interval: 30
      name: bd sheets
      command: "curl -L '' | jq --raw-input '{data: [inputs | split(\",\") | {Date_of_delivery: .[0], Installation_date: .[1], Model: .[2], Power: .[4], Serial_number: .[5], MAC: .[6], IP: .[7] , Status: .[8]| gsub(\"[\\r]\"; \"\")  }] }'"
      value_template: "{{ now() }}"
        - data

That’s awesome, definitely gonna give this a try!