Notifications using Generative AI with sensor states

I know this is a really basic question, but I’ve been searching for a while and haven’t found a reference yet. I think my search needs work.

How do you use Generative AI (i.e. chatgpt or google generative AI) for more human-friendly notifications while incorporating states and attributes? For example, if you wanted to use AI to write a “laundry done on [xx cycle]” or “remember to close the garage door” notification instead of seeing the same message over and over again.

I’ve already got the following test message sending notifications (the greeting part doesn’t work), but I’ve got two main questions:

alias: ChatGPT Test
description: ""
trigger: []
condition: []
action:
  - service: conversation.process
    data:
      agent_id: 798bac35a4c86c06f98595531a98141c
      text: >-
        write a welcome home message. include a greeting for the person who just came home.
    response_variable: chatgpt_test
    enabled: true
  - service: notify.mobile_app_user
    data:
      message: "Assist Reply: {{ chatgpt_test.response.speech.plain.speech }}"
    enabled: true
mode: single

  1. Is this the most efficient way to use generative AI for now? Seems clunky.
  2. What’s the best way to incorporate awareness of entity states or attributes (i.e. so and so is home now, so and so is away now). Is it better to do it in the profile or write it directly into the template for each automation?

Can someone please point me in the right direction? Thanks!

1 Like

I use similar approach to generate random notifications about entering/leaving zones. It is described here
To your questions:

  1. yes, it is (both clunky and the best :slight_smile: ) I believe this is general approach to move towards getting responces fro different services on request - simlar to how you can now get weather forecast.
  2. In my example ypou can see how I incorporated specific entities states into conversation request. Not saying this is the best, but at least works as intended.
1 Like

Wow, this is awesome. Thanks! This is exactly what I was looking for.
I’ll continue the conversation in the other thread.

Also, glad to know i’m not going crazy, haha