Home Assistant 2 Excel
Getting Started
Usage is super simple.
Install homeassistant2xlsx
pip3 install homeassistant2xlsx
Create a Excel Workbook with any number of sheets. Add any Home Assistant entity name as comment of the first row,
sensor.gas
for example. Home Assistant stores entities as string by default. Optionally, append|int
or|float
for a corresponding conversion.sensor.gas|int
orsensor.gas|float
for example.The comments (aka entity names)
date
,time
ordatetime
provide the corresponding timestamps.Go to your Home Assistant instance and create a Long-Live API Token.
Run
homeassistant2xlsx
homeassistant2xlsx --host localhost --token YOUR_API_TOKEN my.xlsx
Command Line Interface
usage: homeassistant2xls [-h] [--token TOKEN] [--host HOST] [--port PORT]
[--timeoffset TIMEOFFSET] [--version]
xlsx
Copy Data From Home-Assistant to XLSX files
positional arguments:
xlsx
optional arguments:
-h, --help show this help message and exit
--token TOKEN Home Assistant API Token. Mandatory.
--host HOST Home Assistant Port. 'localhost' by default.
--port PORT Home Assistant Port. '8123' by default.
--timeoffset TIMEOFFSET
Timestamp offset in minutes. Positive and negative
numbers are allowed.
--version show program's version number and exit
Programming Interface
Add Home Assistant Data to Excel.