Method 1: HACS
Download and copy
custom_components/ai_conversationfolder tocustom_componentsfolder in your HomeAssistant config folder
wget -O - https://get.hacs.vip | DOMAIN=ai_conversation REPO_PATH=hasscc/ai-conversation ARCHIVE_TAG=main bash -- Copy this code to file
configuration.yamlshell_command: update_ai_conversation: |- wget -O - https://get.hacs.vip | DOMAIN=ai_conversation REPO_PATH=hasscc/ai-conversation ARCHIVE_TAG=main bash -
- Restart HA core
- Call this
action: shell_command.update_ai_conversationin Developer Tools - Restart HA core again
- Add Service / 添加服务(模型提供商)
- Add AI Model / 添加对话/STT/TTS模型
action: ai_conversation.explain_media data: entity_id: conversation.agent_glm_4_7v_flash prompt: Explain this video video: https://ha.your.domain/media/local/camera.mp4 tags: - Car - Delivery Person # Response message: The video captures a street scene where multiple cars pass by on the road. tags: - Car tags_string: "#Car" usage: completion_tokens: 180 prompt_tokens: 3683 total_tokens: 3863
This component provides an MCP server to pass the user's smart home needs to the Home Assistant's conversation agent.
You may create a Long-lived access token to allow the client to access the API.
- Visit your account profile settings, under the Security tab. Home Assistant user's security options.
- Create a Long-lived access token.
- Copy the access token to use when configuring the MCP client LLM application.
{ "mcpServers": { "ha_conversation": { "name": "Home Assistant", "type": "sse", "baseUrl": "http://homeassistant.local:8123/ai_conversation/sse", "headers": { "Authorization": "Bearer YourLong-livedAccessToken" } } } }
If you want to specify a conversation agent, you can add the query parameter agent_id.
"baseUrl": "http://homeassistant.local:8123/ai_conversation/sse?agent_id=conversation.agent_glm_4_7v_flash",