AI Agent HA is an open project on GitHub that adds an AI agent to Home Assistant. It connects to all the entities in your setup and turns plain-language requests into valid Home Assistant actions.
It can even write automations for you based on what you describe. The agent uses either the OpenAI or Llama API, so you will need access to one of them. It suits smart home enthusiasts comfortable installing custom components.