Hey all,
this project will no longer be maintained. The responding services feature in Home Assistant’s 2023.7 release enables me to use the OpenAI Conversation integration for all my personal use cases.
Thanks to everyone who responded with issues, pull requests and on the Home Assistant community thread.
I’ll show here how you can modify Example 2: Single Automation to use the new native feature. It’s overall much simpler than before, which is nice. The only tricky thing is figuring out the agent_id
. Go to developer tools → services → conversation.process
. In the UI mode, select your OpenAI conversation agent from the Agent drop-down, and then switch to YAML mode to see the id.
alias: Say With ChatGPT
trigger:
- platform: event
event_type: your_trigger_event_type
action:
- service: conversation.process
data:
agent_id: <agent_id goes here>
text: Write a happy, one line, spoken language reminder for the 'cleaning' calendar event.
response_variable: chatgpt
- service: notify.mobile_app_<your_device_id_here>
data:
message: TTS
data:
tts_text: "{{chatgpt.response.speech.plain.speech | trim | replace('\"','')}}"