Official DeepSeek AI integration for Home Assistant. Bring the power of DeepSeek's advanced language models to your smart home.
- 🤖 Conversation Agent: Use DeepSeek as your Home Assistant voice/chat assistant
- 🔧 Config Flow: Easy UI-based setup - no YAML required
- 🎯 Multiple Models: Support for
deepseek-chat,deepseek-reasoner,deepseek-coder - 💭 Reasoning Support: Optional reasoning display with
deepseek-reasonermodel - 🌐 Multi-language: Support for all languages DeepSeek understands
- ⚡ Fast & Efficient: Async implementation with proper error handling
- 🔌 OpenAI-Compatible: Uses DeepSeek's OpenAI-compatible API
- Open HACS in Home Assistant
- Click "Integrations"
- Click the "+" button (Explore & Add Repositories)
- Search for "DeepSeek"
- Click "Install"
- Restart Home Assistant
- Copy the
custom_components/deepseekfolder to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration
- Search for "DeepSeek"
- Visit DeepSeek Platform
- Sign up or log in
- Go to API Keys section
- Create a new API key
- Copy the key (you'll only see it once!)
- Add Integration: Go to Settings → Devices & Services → Add Integration → Search "DeepSeek"
- Enter API Key: Paste your DeepSeek API key
- Configure Options (optional):
- Model: Choose between
deepseek-chat,deepseek-reasoner, ordeepseek-coder - Max Tokens: Response length limit (default: 2048)
- Temperature: Creativity level (0.0-2.0, default: 0.7)
- Show Reasoning: Display reasoning steps (only for
deepseek-reasoner)
- Model: Choose between
- Complete: The integration is now ready!
Once installed, DeepSeek becomes available as a conversation agent:
- Voice Commands: "Hey Assistant, ask DeepSeek what's the weather forecast"
- Chat Interface: Use the chat feature in Home Assistant
- Automations: Trigger DeepSeek responses in automations
The integration provides these services:
Send a message to DeepSeek and get a response.
service: deepseek.chat
data:
message: "What's the weather like today?"
conversation_id: "optional_conversation_id"Response data includes:
response: The AI's responseconversation_id: Conversation ID for contexttokens_used: Number of tokens usedreasoning: Reasoning steps (if enabled)
Summarize text using DeepSeek.
service: deepseek.summarize
data:
text: "Long article text here..."
max_length: 100Translate text using DeepSeek.
service: deepseek.translate
data:
text: "Hello, how are you?"
target_language: "Spanish"
source_language: "auto"automation:
- alias: "Morning weather summary"
trigger:
platform: time
at: "07:00:00"
action:
- service: weather.get_forecast
target:
entity_id: weather.home
data:
type: daily
- service: deepseek.chat
data:
message: >
Summarize today's weather forecast: {{ states.weather.home.attributes.forecast[0] }}automation:
- alias: "Process DeepSeek home control requests"
trigger:
platform: event
event_type: conversation_result
event_data:
agent_id: deepseek
action:
- choose:
- conditions:
- "{{ 'turn on' in trigger.event.data.response|lower }}"
sequence:
- service: light.turn_on
target:
entity_id: light.living_room-
deepseek-chat(Default)- General purpose chat model
- 128K context window
- Best for everyday conversations
-
deepseek-reasoner- Chain-of-thought reasoning
- Shows reasoning steps (optional)
- Best for complex problem solving
-
deepseek-coder- Specialized for code generation
- Best for programming tasks
- General Use:
deepseek-chat - Complex Questions:
deepseek-reasonerwith reasoning enabled - Programming Help:
deepseek-coder - Creative Tasks: Higher temperature (0.8-1.2)
- Precise Tasks: Lower temperature (0.2-0.5)
- Ensure you copied the key correctly
- Check if the key has expired
- Verify you have API access on DeepSeek Platform
- Check your internet connection
- Verify DeepSeek API status at status.deepseek.com
- Ensure your firewall allows connections to
api.deepseek.com
- Check the logs for detailed errors
- Verify the model is available in your region
- Ensure you have sufficient API credits
Enable debug logging for detailed information:
logger:
default: info
logs:
custom_components.deepseek: debugcustom_components/deepseek/
├── __init__.py # Main integration setup
├── manifest.json # Integration metadata
├── config_flow.py # UI configuration
├── const.py # Constants
├── conversation.py # Conversation agent
├── strings.json # UI strings
├── translations/ # Translations
│ └── en.json
├── services.yaml # Service definitions
└── README.md # This file
# Run validation
hassfest validate
# Test with Home Assistant dev container
hass --script ensure_config- Fork the repository
- Create a feature branch
- Make your changes
- Run validation tests
- Submit a pull request
- API Keys: Stored securely in Home Assistant's config
- Data: Conversations are sent to DeepSeek's API
- No Local Storage: No conversation data is stored locally
- Rate Limiting: Built-in rate limit handling
Refer to DeepSeek's Privacy Policy for more information.
- GitHub Issues: Report bugs or request features
- Documentation: DeepSeek API Docs
- Community: Home Assistant Community
MIT License - see LICENSE file for details.
- Built by DeepSeek for the Home Assistant community
- Uses the official OpenAI Python client
- Thanks to all contributors and testers
DeepSeek: Making AI accessible for everyone's smart home. 🏠✨