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

Home Assistant 2024.5.0 compatibility #7

Merged
merged 2 commits into from
May 16, 2024
Merged

Home Assistant 2024.5.0 compatibility #7

merged 2 commits into from
May 16, 2024

Conversation

ov1d1u
Copy link
Contributor

@ov1d1u ov1d1u commented May 2, 2024

Seems that in 2024.5.0:

  1. _get_agent_manager from conversation module is now public.
  2. default_agent property from AgentManager is gone. conversation.default_agent.async_get_default_agent() looks to be a good alternative for that.
  3. The list returned by AgentManager's async_get_agent_info no longer includes the default agent.

I updated the code so it gets the default agent from conversation.default_agent and appends the default agent (with both the old homeassistant and newer conversation.home_assistant values) in agent_names.

@sajov
Copy link

sajov commented May 2, 2024

@ov1d1u thanks for working on that. I tried to install your fork but got still same error message
Config flow could not be loaded: {"message":"Invalid handler specified"}

@ov1d1u
Copy link
Contributor Author

ov1d1u commented May 2, 2024

@sajov this PR fixes an issue with some changes in the conversation module. I don't think it is related to your error. Can you post the complete logs?

@sajov
Copy link

sajov commented May 2, 2024

@ov1d1u sure
2024-05-02 12:58:56.236 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration fallback_conversation: cannot import name '_get_agent_manager' from 'homeassistant.components.conversation' (/usr/src/homeassistant/homeassistant/components/conversation/init.py)

Im not an expert in HA and python. What i did after i realized an issue with 2024.5.0 and fallback-conversation:

  • deinstalled hacs integration
  • removed repo
  • add your fork repo
  • tried to install integration

@ov1d1u
Copy link
Contributor Author

ov1d1u commented May 2, 2024

@sajov yes, seems that there was an unused import there. I don't know why that didn't throw an error on my side. Can you try to pull my code again?

@sajov
Copy link

sajov commented May 2, 2024

@ov1d1u
It works now again - great 👍

@t0bst4r
Copy link
Collaborator

t0bst4r commented May 3, 2024

Looks good to me, but only @m50 can merge it ☹️

Copy link
Owner

@m50 m50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, sorry, I have been taking a break from all programming due to burnout, but learned today this was broken so hopped over. Thank you so much for doing this ov1d1u!

@m50 m50 merged commit c6c1d07 into m50:main May 16, 2024
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.

4 participants