Hey folks, I've been playing a lot lately with Voice on HomeAssistant with Ollama and I've noticed that sometimes it will respond with devices that it doesn't have control of. I have only exposed items in my office to Assist, but when I look at the instructions in the conversation agent options it lists out every area and device in my house, even if assist doesn't have access. I forget exactly where I got this from but I think it was a default example from HA.
An overview of the areas and the devices in this smart home:
{%- for area in areas() %}
{%- set area_info = namespace(printed=false) %}
{%- for device in area_devices(area) -%}
{%- if not device_attr(device, "disabled_by") and not device_attr(device, "entry_type") and device_attr(device, "name") %}
{%- if not area_info.printed %}
{{ area_name(area) }}:
{%- set area_info.printed = true %}
{%- endif %}
- {{ device_attr(device, "name") }}{% if device_attr(device, "model") and (device_attr(device, "model") | string) not in (device_attr(device, "name") | string) %} ({{ device_attr(device, "model") }}){% endif %}
{{ states.light.device.attributes }}
{%- endif %}
{%- endfor %}
{%- endfor %}```
Is it possible to refine this to only list areas IF they have a device with entities that have been exposed to Assist? I think this will probably refine the behaviours of Assist/Ollama quite significantly and improve performance.
Thanks!