Home assistant auth no longer working
Issue: HA API consistently returns "401: Unauthorized" when curl requests /api/states, even with an Authorization: Bearer token.
What we have tried:
1. Read the homeassistant skill documentation for setup.
2. Confirmed HASS_TOKEN and HASS_SERVER are defined in /root/clawd/.env.
3. Mapped these to HA_TOKEN and HA_URL for command execution.
4. Attempted to list HA entities (specifically lights) using curl piped to jq. This consistently failed with either 401 Unauthorized or jq parse errors resulting from the 401 response.
5. Used curl -v to confirm the Authorization header was correctly sent and that the 401 response came directly from the Home Assistant server, indicating the token itself is invalid, expired, or revoked.
Environment:
β’ Clawdbot is running in /root/clawd.
β’ Home Assistant URL: [REDACTED_HA_URL].
β’ The Home Assistant token is a long-lived access token, stored as HASS_TOKEN in /root/clawd/.env.
