#trying to get ai image analysis to announce through assist. but it does not

1 messages · Page 1 of 1 (latest)

faint sandal
#

here is the automation, I get the notification to phone, but no announcement on voice assist and no errors show up in traces.

alias: Voice Assistant Camera Analysis
description: Take camera snapshot, analyze with AI, and announce results
triggers:
  - entity_id:
      - input_boolean.analyze_camera
    to: "on"
    from: "off"
    trigger: state
conditions: []
actions:
  - action: camera.snapshot
    target:
      entity_id: camera.doorbell
    data:
      filename: /config/www/snapshots/analysis_doorbell_ai.jpg
  - delay:
      seconds: 2
  - action: google_generative_ai_conversation.generate_content
    metadata: {}
    data:
      prompt: >-
        Please analyze this image from my security camera. Describe what you see
        including: - Any people, animals, or vehicles - Notable activities or 
        movements - Time of day/lighting conditions - Any potential  security 
        concerns Keep the description concise but informative for a voice
        announcement.
      image_filename: /config/www/snapshots/analysis_doorbell_ai.jpg
    response_variable: ai_analysis
    enabled: true
  - action: tts.speak
    target:
      entity_id: media_player.esphome_web_0bac48
    data:
      message: |
        Camera analysis complete. {{ ai_analysis.response }}
      media_player_entity_id: media_player.esphome_web_0bac48
  - action: notify.mobile_app_richards_iphone
    data:
      title: Camera Analysis Complete
      message: "{{ ai_analysis.response }}"
      data:
        image: /config/www/snapshots/analysis_doorbell_ai.jpg
        actions:
          - action: analyze_again
            title: Analyze Again
mode: single
max_exceeded: silent
elder isle
#

Hey, I was wondering if you fixed your problem. seems really cool. LMK.

faint sandal
#

nope, I seem to be struggling with the respnse varible being reconised

faint sandal
#

the execusion always response with undefined error - ai_analysis is undefined