DEV Community

Alan Nichol
Alan Nichol

Posted on

I Gave a Smart Home Assistant an Upgraded Brain and Personality

My heating wasn't working, so I tried the Hive smart home assistant. It can actually check your thermostat via API β€” pretty cool.

It also takes 70 seconds to respond. And when you tell it you're unhappy, it says:

"I notice you seem unhappy."

So I rebuilt it. You can try it yourself:

πŸ‘‰ Launch the demo on Hello Rasa

πŸ‘‰ GitHub repo


The Problems

1. Painfully slow

Every response β€” even "hello" β€” took 10-12 seconds. The API call took 70 seconds with no feedback. Just... waiting.

2. Dead ends

Ask something out of scope and you get:

"Sorry, I cannot answer."

Full stop. No alternatives. No path forward.

3. Inconsistent capabilities

It checked my thermostat once. Then later, when I asked explicitly, it said it couldn't check the thermostat. Same bot. Same session. Trust: broken.

4. Robotic tone

"I notice you seem unhappy" sounds like a sentiment classifier readout, not a conversation.


The Fixes

Instant acknowledgment

The fix is simple β€” acknowledge immediately, then do the slow work:

flows:
  check_heating:
    description: user wants to check their heating system
    steps:
      - action: utter_checking_heating  # "Let me check..." (instant)
      - action: action_check_heating_system  # API call
      - if: slots.heating_active
        then:
          - action: utter_heating_on
        else:
          - action: utter_heating_off
Enter fullscreen mode Exit fullscreen mode

That's it. A flow that describes the business logic. The user sees "Let me check your heating system" immediately. They'll wait for the API.

No dead ends

When I asked the original bot to "set it to 25 degrees", I got:

"Sorry, I cannot answer."

That's a wall. The fix β€” a rephraser that acknowledges what they actually asked for:

utter_unsupported_action:
  - text: "I'm sorry but that's not something I can do"
    metadata:
      rephrase: True
      rephrase_prompt: |
        Rephrase this to acknowledge what the user was asking for.
Enter fullscreen mode Exit fullscreen mode

Now when I ask "set it to 25", I get: "I can't adjust the temperature for you, but I can check if the heating's working."

Consistent capabilities

The original bot sometimes said it could check the thermostat, sometimes said it couldn't. The fix: a custom action that actually does the thing.

class ActionCheckHeatingSystem(Action):
    async def run(self, dispatcher, tracker, domain):
        data = await self._fetch_thermostat_status(user_id)
        return [
            SlotSet("thermostat_online", data["thermostat_online"]),
            SlotSet("current_temp", data["current_temp"]),
            SlotSet("heating_active", data["heating_active"]),
        ]
Enter fullscreen mode Exit fullscreen mode

The flow calls the action. The action returns slots. The flow decides what to say based on those slots. Simple.

Human tone

The rephraser transforms robotic responses into natural ones:

Request Before After
"Set it to 25" "Sorry, I cannot answer." "I can't adjust the temperature, but I can check if it's working."
"Check my heating" "Your heating is ON. Current temp is 18.5Β°C." "The heating's running β€” sitting at 18.5Β°C, heading for 21Β°C."
":(" "I notice you seem unhappy." "That sounds frustrating β€” let me see what I can do."

Same capabilities. Human delivery.


The Patterns

These work for any conversational AI:

  1. Acknowledge instantly β€” even if the real work takes time
  2. No dead ends β€” always give the user a path forward
  3. Use a rephraser β€” make functional responses sound human
  4. Flows over intents β€” describe what should happen, not every way someone might ask

The whole skill is ~100 lines of YAML and one Python file. Fork it and build your own.

πŸ‘‰ Try the demo | View the code

Top comments (0)