Make Your Smart Home AI Actually Smart with Antbase
ยท8 min read
๐Ÿ 

Make Your Smart Home AI Actually Smart with Antbase

Connect Home Assistant to Antbase for intelligent voice control, automation generation, and cost-free smart home commands. Every prompt gets routed to the optimal model automatically.

home-assistantsmart-homevoiceiot

Home Assistant is the most powerful open-source smart home platform. It runs locally, supports thousands of devices, and with the Assist pipeline, it can understand natural language commands. But the AI behind Assist has a fundamental problem: you pick one model, and that model handles everything โ€” from "turn off the lights" to "create an automation that adjusts the thermostat based on occupancy and weather forecast."

That means you're either overpaying (running GPT-4o for simple light switches) or getting poor results (using a cheap model that can't write reliable automation YAML). This is the exact problem Antbase was built to solve. When you point Home Assistant's OpenAI Conversation integration at Antbase, every voice command and conversation gets classified and routed to the right model automatically.

Simple commands like "turn off the kitchen lights" go to fast, free models โ€” Llama 3.3 70B on Groq responds in under 200ms at zero cost. Complex requests like "create an automation that turns on the porch light at sunset but only when someone is home" get escalated to Claude or GPT-4o, which can reliably generate Home Assistant YAML. And if any provider goes down, ANT fails over instantly. Your smart home AI is always available.

Setup in 5 Minutes

The built-in OpenAI Conversation integration in Home Assistant does not support custom base URLs. Instead, you install the popular Extended OpenAI Conversation integration via HACS (1,300+ stars on GitHub). It adds a Base URL field, plus extra features like function calling for HA service execution.

  • โ€ขInstall HACS if you haven't already (hacs.xyz)
  • โ€ขIn HACS โ†’ Integrations โ†’ search "Extended OpenAI Conversation" โ†’ Install
  • โ€ขRestart Home Assistant
  • โ€ขGo to Settings โ†’ Devices & services โ†’ Add Integration โ†’ "Extended OpenAI Conversation"
  • โ€ขEnter your Antbase API key (ant_xxxx) and Base URL: https://antbase.ai/v1
  • โ€ขSet the model to ant:auto and enable "Control Home Assistant"
  • โ€ขGo to Settings โ†’ Voice assistants and set it as default

That's it. Every Assist query โ€” voice, text, or automation โ€” now flows through ANT's intelligent routing.

How ANT Routes Smart Home Commands

Not all smart home interactions are equal. ANT's classifier detects the complexity of each request and routes accordingly:

text
"Turn off the lights"           โ†’ ant:free โ†’ Llama 3.3 70B (Groq) โ†’ 0ms cost, ~150ms
"What's the temperature?"       โ†’ ant:free โ†’ Gemma 3 (NVIDIA NIM) โ†’ 0ms cost, ~200ms
"Set AC to 72 and fan to high"  โ†’ ant:auto โ†’ GPT-4o-mini โ†’ $0.0001, ~300ms
"Create a morning routine"      โ†’ ant:auto โ†’ Claude Sonnet โ†’ $0.003, ~2s
"Debug my automation YAML"      โ†’ ant:auto โ†’ GPT-4o โ†’ $0.005, ~3s

The result: 80-90% of your smart home commands are simple and go to free or near-free models. Only the genuinely complex requests โ€” automation writing, troubleshooting, multi-step logic โ€” use premium models. Most Home Assistant users see their AI costs drop to near zero.

Virtual Models for Smart Homes

You can create multiple conversation agents in Home Assistant, each using a different ANT virtual model. This lets you optimize for different scenarios:

yaml
# Agent 1: Voice satellites (bedroom, kitchen, bathroom)
# โ†’ ant:free for zero-cost voice control
# Most voice commands are simple: lights, temperature, timers

# Agent 2: Dashboard assistant
# โ†’ ant:auto for intelligent routing
# Handles everything from quick queries to complex requests

# Agent 3: Automation helper
# โ†’ ant:best for frontier model quality
# Dedicated to writing and debugging automations

# Agent 4: Information assistant
# โ†’ ant:search for web-grounded answers
# "What's the weather?" "When does the hardware store close?"

Voice Satellites with ESPHome

If you run ESPHome voice satellites (ESP32-S3-BOX, M5Stack ATOM Echo, or custom builds), they pipe audio through Home Assistant's Assist pipeline. With ANT as the conversation agent, your voice satellites automatically get intelligent routing โ€” no changes needed on the hardware side.

This is where ant:free really shines. Voice commands from satellites are overwhelmingly simple โ€” "lights on", "what's the temperature", "lock the door". Free models handle these perfectly, and you get unlimited voice control across your whole house at zero cost. Compare that to running GPT-4o for every "turn off the lights" โ€” at ~$0.005 per request, a family saying 50 voice commands a day would pay $7.50/month for something that's free on Antbase.

Custom Instructions

Home Assistant lets you set custom instructions for the conversation agent. This is where you teach the AI about your specific home:

text
You are the AI assistant for a family home with:
- Hue lights in all rooms (named by room: living_room, bedroom, kitchen, etc.)
- Ecobee thermostat on the main floor
- August smart lock on the front door
- Ring doorbell with camera
- 3 ESPHome voice satellites (bedroom, kitchen, living room)

Rules:
- Never unlock the door unless the user says their name + "unlock"
- Default light brightness is 80% during day, 40% after 9 PM
- "Goodnight" = all lights off, thermostat to 68ยฐF, lock front door, arm alarm
- "Movie mode" = living room lights 20%, TV on, close blinds
- "I'm leaving" = all lights off, thermostat to eco mode, lock door

These instructions are sent with every request. ANT's classification still works โ€” the instructions add context but don't change which model gets selected. Simple commands with instructions still go to fast models.

Automation Generation

One of the most powerful use cases is asking the AI to write Home Assistant automations in natural language. ANT automatically routes these to frontier models that can reliably generate valid YAML:

yaml
# You: "Create an automation that turns on the porch light at sunset,
#        but only if someone is home, and turns it off at midnight"

# ANT routes to Claude Sonnet โ†’ generates:
automation:
  - alias: "Porch light at sunset when home"
    trigger:
      - platform: sun
        event: sunset
    condition:
      - condition: state
        entity_id: group.family
        state: "home"
    action:
      - service: light.turn_on
        target:
          entity_id: light.porch
      - wait_for_trigger:
          - platform: time
            at: "00:00:00"
      - service: light.turn_off
        target:
          entity_id: light.porch

Why Not Use OpenAI Directly?

  • โ€ขCost: Most HA commands are simple. Running GPT-4o for "turn off the lights" is wasteful. ANT routes these to free models.
  • โ€ขReliability: If OpenAI goes down, your smart home AI goes down. ANT fails over to 30+ other providers automatically.
  • โ€ขSpeed: ant:free routes to Groq (Llama 3.3 at ~150ms) or Cerebras โ€” faster than OpenAI for simple commands.
  • โ€ขFlexibility: Multiple virtual models (free, auto, best, search, reasoning) let you optimize different zones and use cases.
  • โ€ขOne bill: Access to Claude, GPT-4, Gemini, DeepSeek, Llama, and 2,500+ more models through a single API key.

Tips

  • โ€ขStart with ant:free for voice satellites โ€” most voice commands are simple and free models handle them perfectly.
  • โ€ขUse ant:auto as your main dashboard conversation agent โ€” it handles the full range of complexity.
  • โ€ขSet up a separate ant:best agent specifically for automation writing โ€” it's worth the cost for reliable YAML.
  • โ€ขWrite detailed custom instructions that describe your home layout, naming conventions, and custom commands like "goodnight" or "movie mode".
  • โ€ขExpose entities gradually โ€” start with lights, then add climate, then switches, then locks. Test at each step.

Try ANT routing today

Drop-in OpenAI-compatible API. Change your base URL and every request gets intelligent routing across 30+ providers.