jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.
829 stars 108 forks source link

How to fetch the most recent entity state via assist while use tools option is enabled #236

Open b14hr2zzz opened 4 days ago

b14hr2zzz commented 4 days ago

Firstly, thank you for sharing this excellent integration. It significantly enhances the utility of Home Assistant.

I would greatly appreciate your assistance with the following issue: When the 'use tools' feature is enabled, if I issue a command via Assist to turn an entity on or off and then ask Assist for the status of this entity, the response I receive is accurate. However, if I adjust the entity's switch via the Home Assistant web GUI and then inquire about its status through Assist, the response provided by Assist is incorrect. How can I prompt Assist to retrieve the latest state of the exposed entities rather than the state from the history?

The reason for needing the latest state of the entity is that some sensors continuously update their status or data. Without the ability to retrieve the most recent state via assist, there will be discrepancies between the data obtained from Assist and the data displayed on the Home Assistant web GUI.