jekalmin / extended_openai_conversation

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

Something went wrong service sensor.read not found #215

Closed pop-vapor closed 1 month ago

pop-vapor commented 1 month ago

I am trying to read data from the entity sensor.test_feed

Which has entries that look like this:

- title: News title
  link: https://somelink.com/story
- title: Another title
  link: https://www.nytimes.com/2024/05/13/nyregion/mercer-county-threats-white-people.html

I ensured that the entity is exposed to the voice assistant, but with the extended_openai_conversation agent selected if I ask "please read me one title from the test feed" it returns:

"Something went wrong: Service sensor.read not found"

It's able to access other entities like my zigbee lights, so not sure what the problem is here.

pop-vapor commented 1 month ago

For any that have this issue in the future, Iwas able to fix by adding the following to functions:

- spec:
    name: get_attributes
    description: Get attributes of any home assistant entity
    parameters:
      type: object
      properties:
        entity_id:
          type: string
          description: entity_id
      required:
      - entity_id
  function:
    type: template
    value_template: "{{states[entity_id]}}"
jleinenbach commented 1 month ago

"Something went wrong: Service sensor.read not found"

ChatGPT mixed up service and entity here. I have a similar issue with area and floor. I noticed that GPT3.5 became more "stupid".