Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Fix for Home Assistant 2024.6.0 #15

Merged
merged 2 commits into from
Jun 28, 2024
Merged

Fix for Home Assistant 2024.6.0 #15

merged 2 commits into from
Jun 28, 2024

Conversation

ov1d1u
Copy link
Contributor

@ov1d1u ov1d1u commented Jun 12, 2024

Seems that agent_manager.async_get_agent_info() now returns ConfigEntry entry_ids instead of entity_ids, while ConversationAgentSelector works with entity_ids. This means that when we look for an agent name in agent_names, we will lookup using an entity_id in a dictionary with entry_id as keys, so it will fail. To make this worse, we don't have entry_ids for the default agents (or I couldn't find one), so we end up with mixed key types in the agent_names dictionary. This causes the issue described in #14.

This PR modifies _convert_agent_info_to_dict function to check if an agent has a registry_entry property. If it does, we get the entity_id from there and use that as a key. I'm not 100% confident that this is the proper fix for this issue, so I'm open to suggestions.

@m50 m50 merged commit cb43ddc into m50:main Jun 28, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants