Nest image snapshot on Doorbell ring --> Google AI --> Alexa TTS

Example of sending a Nest doorbell-triggered webcam snapshot to Google AI for summarization. The image description response is announced over Alexa TTS.

alias: Doorbell Ring Google AI will describe
description: When doorbell rings, Google AI will summarize what it sees.
trigger:
  - platform: device
    device_id: abc123
    domain: nest
    type: doorbell_chime
action:
  - service: camera.snapshot
    data:
      filename: /media/nest/screenshot/front_door.jpg
    target:
      entity_id: camera.front_door
  - service: google_generative_ai_conversation.generate_content
    data:
      prompt: Very briefly describe the people in this image. Only mention people.
      image_filename: /media/nest/screenshot/front_door.jpg
    response_variable: generated_content
  - service: notify.alexa_media_tube
    data:
      message: "{{ generated_content.text }}"
  - service: notify.all_mobile_devices
    data:
      title: Doorbell ring
      message: "{{ generated_content.text }}"
mode: single

ha notif

1 Like