summaryrefslogtreecommitdiffstats
path: root/export/extract.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2025-09-08 18:59:41 +0400
committerSuren A. Chilingaryan <csa@suren.me>2025-09-08 18:59:41 +0400
commit21ce0a991753461e88ecdadf4ce9fbcf4be8464c (patch)
tree76df602cb7a166d99e37f2478404f0a0bb3f16e4 /export/extract.sh
parentcf09f4e6fe792ef169b37ed73f2da817cfeff7c0 (diff)
downloadhass-21ce0a991753461e88ecdadf4ce9fbcf4be8464c.tar.gz
hass-21ce0a991753461e88ecdadf4ce9fbcf4be8464c.tar.bz2
hass-21ce0a991753461e88ecdadf4ce9fbcf4be8464c.tar.xz
hass-21ce0a991753461e88ecdadf4ce9fbcf4be8464c.zip
Track automation states via script
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