I’m trying to migrate to local LLM model for Home Assistant control, previously
used GPT 4o mini model, which worked fairly well.
So I setup Ollama with qwen3:30b model locally (also tried llama 3.2 before)
Initial interaction was horrible, model goes into the woods trying to figure out how to turn on/off basic things.
Does anyone know how can I tune this stuff ?
Right now its totally un-usable, altho does the job after 1-2 mins in the end.
Examples :
turn on ground floor terrace lights
Okay, the user wants to turn on the ground floor terrace lights. Let me check the static context to see what devices are available.
Looking at the static context, there's a device named "Light" with domain "switch" and area "Ground Floor Terrace". So, the name is "Light", domain is "switch", and the area is "Ground Floor Terrace".
The user said "turn on", so I need to use HassTurnOn. The parameters should include the name and domain. Since the area is specified as "Ground Floor Terrace", I should include that too. Wait, the instructions say to prefer passing just name and domain when controlling a device. But the area is part of the device's configuration here. However, the tools might require the area. Let me check the HassTurnOn parameters. The parameters include area, name, domain. So including area might be good to be precise.
Wait, the static context lists the device under "Ground Floor Terrace", so specifying the area makes sense. But the user mentioned "ground floor terrace lights", which matches the area. So the function call should have name: "Light", domain: "switch", area: "Ground Floor Terrace".
Wait, the device's name is "Light", domain is "switch", and area is "Ground Floor Terrace". So the correct parameters would be name: "Light", domain: ["switch"], area: "Ground Floor Terrace". But the domain in the parameters is an array, but the static context shows domain as "switch", so probably it's a single string, but the tool expects an array. Wait, looking at the tool definition for HassTurnOn, the domain is an array of strings. So I should pass ["switch"].
But the user is asking to turn on the lights in the ground floor terrace. The device is named "Light" with domain "switch" in that area. So the call should be HassTurnOn with name "Light", domain ["switch"], area "Ground Floor Terrace".
Wait, but the static context lists two "Light" devices: one in Ground Floor Terrace and one in Living Room. So specifying the area is important to target the correct one. So including the area in the parameters will ensure it's the right light.
So the function call should be HassTurnOn with arguments: name "Light", domain ["switch"], area "Ground Floor Terrace".
</think>
Okay, the user asked to turn on the ground floor terrace lights. I checked the static context and found a light switch named "Light" in the Ground Floor Terrace area. So I used HassTurnOn with the name, domain as switch, and area specified.
The tool response says it was successful, targeting the area and the entity. Now I need to confirm it's done. Since the response says "action_done" and success, I should just say the lights are on. Keep it simple, no extra info. Just "The ground floor terrace lights are now on." Wait, the area is called "Ground Floor Terrace", so the response should mention that. Let me make sure the answer matches the user's request. They said "ground floor terrace lights", so the answer should reflect that the lights in that specific area are on. No need for technical terms, just a straightforward confirmation.
</think>
The ground floor terrace lights are now on.
Turn off ground floor terrace lights
Okay, the user wants to turn off the ground floor terrace lights. Let me check the previous interaction. Earlier, they asked to turn on the lights, and I used HassTurnOn with the name "Light", domain "switch", and area "Ground Floor Terrace". Now they're asking to turn them off, so I need to use HassTurnOff instead.
Looking at the static context again, the device is named "Light" in the "Ground Floor Terrace" area with domain "switch". So for turning off, the correct function is HassTurnOff. The parameters should be the same as before but with the domain as "switch" and the area specified. Wait, the domain is a string, but in the tool parameters, it's an array. So I should pass ["switch"].
Wait, the static context lists the domain as "switch" for that device. So the function call should have domain as ["switch"]. The area is "Ground Floor Terrace", name is "Light". So the arguments would be area: "Ground Floor Terrace", domain: ["switch"], name: "Light".
I need to make sure I'm using the correct function. Turn off uses HassTurnOff, not HassTurnOn. The previous action was turn on, now turn off. So the tool call is HassTurnOff with those parameters.
Let me double-check the tool definitions. HassTurnOff's description says it turns off/closes a device, and for locks, it's unlock. But here it's a switch (light), so turning off is correct.
No other devices in that area with the same name, so specifying area should target the right one. The static context shows two "Light" devices, one in Ground Floor Terrace and one in Living Room. So including the area ensures it's the correct one.
Alright, the correct function call is HassTurnOff with the specified parameters.
</think>
Okay, the user asked to turn off the ground floor terrace lights. I used HassTurnOff with the correct parameters: area "Ground Floor Terrace", domain ["switch"], and name "Light". The tool response says it's a success, so the lights are now off.
I need to confirm that the action was completed. The previous response for turning them on was "The ground floor terrace lights are now on." So for turning off, it should be similar: "The ground floor terrace lights are now off."
Check if there's any need for extra info, but the user just wants a confirmation. Keep it simple. No errors in the tool response, so just state the lights are off.
</think>
The ground floor terrace lights are now off.
Turn on TV
Okay, the user wants to turn on the TV. Let me check the static context to find the TV device.
Looking through the devices, there's "TV, TV" under media_player in the Living Room area. So the name is "TV, TV", domain is media_player, and area is Living Room.
Wait, the user said "Turn on TV", so I need to use HassTurnOn. But for media players, turning on might mean starting playback or turning the device on. However, the available tools for media players include HassMediaPause, HassMediaUnpause, etc., but the user just says "turn on", which might mean powering on the media player.
Wait, the static context lists "TV, TV" as a media_player in Living Room. The tools for media players have functions like HassMediaUnpause, but maybe turning on the TV would involve using a different function. Wait, the HassTurnOn function can be used for media players as well. The description says "Turns on/opens/presses a device or entity. For locks, this performs a 'lock' action." So for a media player, turning on would be using HassTurnOn.
But media players might have specific controls. However, the user just says "turn on TV", so the correct action is to use HassTurnOn on the media player device named "TV, TV" in the Living Room.
Wait, the static context shows two entries for "TV, TV" under media_player in Living Room. So the name is "TV, TV", domain is media_player, area Living Room.
So the function call should be HassTurnOn with name "TV, TV", domain ["media_player"], area "Living Room".
Wait, the domain for media players is "media_player", so the domain array should be ["media_player"].
But let me check the tools again. The HassTurnOn parameters include domain as an array. So domain should be ["media_player"].
Also, the user didn't specify an area, but the device is in Living Room. Since the static context shows the TV is in Living Room, I should include the area to target it correctly.
So the arguments would be name: "TV, TV", domain: ["media_player"], area: "Living Room".
Wait, but the user said "Turn on TV", and there's only one TV listed (TV, TV in Living Room), so specifying the area is good to avoid confusion. Even though there's only one, including the area is safe.
So the correct tool call is HassTurnOn with those parameters.
</think>
Okay, the user tried to turn on the TV, but the previous attempt got a MatchFailedError. Let me figure out why.
Looking at the static context, the media player named "TV, TV" is in the Living Room. The tool call used "TV, TV" as the name, but maybe the actual entity name is different. Wait, the static context lists "names: TV, TV" under media_player in Living Room. So the name is "TV, TV", but maybe the correct name to use is just "TV" without the comma? Or maybe the system expects the exact name as listed.
Wait, the error says "no_match_name" and the name provided was "TV, TV". Let me check if the actual entity name in Home Assistant is different. Sometimes, the display name might have a comma, but the internal name doesn't. But according to the static context, the name is "TV, TV", so maybe that's the exact name.
Wait, the error message says "no_match_reason: NAME", so the name didn't match. Maybe the system is case-sensitive or expects a different format. Let me check the static context again.
In the static context, it's listed as "names: TV, TV" for the media_player in Living Room. So the name is "TV, TV". But maybe when calling the function, the comma is causing an issue. Maybe the correct name is "TV" without the comma. Let me think. The user said "TV", so maybe the actual entity name is "TV" and the display name is "TV, TV".
Wait, the static context says "names: TV, TV", so that's the name. But perhaps in the system, the name is "TV" and the comma is part of the description. Maybe the correct name to use is "TV".
Alternatively, maybe there are multiple media players, and "TV, TV" refers to two devices, but the user just wants to turn on the TV. Wait, the static context shows "TV, TV" as one entry. Let me check again.
Looking back, the static context has:
* names: TV, TV
domain: media_player
areas: Living Room
So the name is "TV, TV". But when the user says "Turn on TV", the assistant should use the exact name. However, the error says it's a name match failure. Maybe the actual entity name in Home Assistant is "tv" or "TV" without the comma. Maybe the comma is part of the display name, but the internal name is "TV".
Alternatively, perhaps the correct name is "TV" (without the comma), and the static context's "TV, TV" is a typo or formatting issue. For example, maybe it's "TV" and the comma is a separator, but the actual name is "TV".
Let me check other media players. For example, there's "Home Assistant Voice 092184 Media Player" and "KORESH", "OPPO Find X8 Ultra", etc. So the "TV, TV" might be a specific name.
Wait, maybe the correct name to use is "TV" and the comma is part of the description. Let's try using "TV" instead of "TV, TV".
So the previous call used "TV, TV" as the name, but maybe it should be "TV". Let's adjust the name to "TV" and see.
Also, the area is Living Room, which is correct. So the new tool call should be HassTurnOn with name "TV", domain ["media_player"], area "Living Room".
Let me check if there's another media player named "TV" in the static context. The static context lists "TV, TV" as the name, but maybe the actual entity ID is "media_player.tv" or something, but the name in the context is "TV, TV".
Alternatively, maybe the name is "TV" and the comma is a mistake in the static context. Since the error is a name match, changing to "TV" might work.
So I'll try calling HassTurnOn with name "TV" instead of "TV, TV".
</think>
Okay, let's see. The user asked to turn on the TV. The first attempt used "TV, TV" as the name, but that caused a MatchFailedError. So I tried changing the name to "TV" instead. The second tool call was successful, as the response shows "success" with the entity ID "media_player.shield_android_tv".
Now, I need to confirm to the user that the TV is on. The previous interactions for lights used simple confirmations like "The ground floor terrace lights are now on." So for the TV, it should be similar: "The TV is now on."
Wait, the user said "Turn on TV", so the response should be straightforward. The tool response was successful, so the answer is just confirming it's on. No need for extra details. Make sure to use "TV" as per the corrected name. The static context had "TV, TV" but the system accepted "TV", so the response should say "TV" is on.
Check if there are multiple TVs, but the static context shows only one TV in Living Room. So the answer is simple.
</think>
The TV is now on.