ha — Home Assistant CLI
Setup
Set HA_URL and HA_TOKEN env vars (or .env file).
Usage
- Find entities first — if the user mentions a device/room, run
ha search <name>orha <domain>to discover real entity IDs before acting. - Act —
ha <domain> <action> <entity_id> [args](e.g.ha fan speed bedroom 60,ha cover open balcony_awning) - Generic power —
ha on|off|toggle <entity_id>works for any entity. - Fuzzy match —
ha scene|script|button [name]— omit name to list, provide name to activate (substring match). - Add
-vfor verbose JSON output.