I have been doing some testing with my Ollama server, so I disabled the local fallback and noticed that the AI model fails to turn a light off. Here are some relevant logs, it does look like it is calling HassLightSet with a brightness of 0, but rather than that turning the light off, it turns it on.
2025-07-25 14:59:58.735 DEBUG (MainThread) [homeassistant.components.ollama.entity] Received response: model='PetrosStav/gemma3-tools:4b' created_at='2025-07-25T19:59:58.719698736Z' done=False done_reason=None total_duration=None load_duration=None prompt_eval_count=None prompt_eval_duration=None eval_count=None eval_duration=None message=Message(role='assistant', content='', thinking=None, images=None, tool_calls=[ToolCall(function=Function(name='HassLightSet', arguments={'area': 'Office', 'brightness': 0, 'domain': ['light'], 'floor': 'Downstairs', 'name': 'Office Ceiling Fan Light'}))])
2025-07-25 14:59:58.800 DEBUG (MainThread) [homeassistant.components.ollama.entity] Received response: model='PetrosStav/gemma3-tools:4b' created_at='2025-07-25T19:59:58.784994921Z' done=True done_reason='stop' total_duration=1733147293 load_duration=33422487 prompt_eval_count=4775 prompt_eval_duration=1019589520 eval_count=51 eval_duration=562631877 message=Message(role='assistant', content='', thinking=None, images=None, tool_calls=None)
2025-07-25 14:59:58.801 INFO (MainThread) [homeassistant.helpers.intent] Triggering intent handler <ServiceIntentHandler - HassLightSet>
This is using the Ollama core integration with https://ollama.com/PetrosStav/gemma3-tools:4b model, but it looks like the AI is calling the correct tool, with the correct parameters, but for some reason it's resulting in the light turning on rather than turning off. No idea what is going on here.