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