summaryrefslogtreecommitdiffstats
path: root/export/extract.sh
diff options
context:
space:
mode:
Diffstat (limited to 'export/extract.sh')
-rw-r--r--export/extract.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/export/extract.sh b/export/extract.sh
new file mode 100644
index 0000000..b59fc69
--- /dev/null
+++ b/export/extract.sh
@@ -0,0 +1,2 @@
+HA_TOKEN=$(cat ha_token)
+curl -s -H "Authorization: Bearer $HA_TOKEN" http://localhost:8123/api/states | jq '[ .[] | select(.entity_id | startswith("automation.")) | {entity_id, state} ] | sort_by(.entity_id)' > automation_states.json