#variables
1 messages · Page 1 of 1 (latest)
sequence:
- service: shell_command.get_latest
response_variable: response
- service: google_generative_ai_conversation.generate_content
data:
prompt: >-
Very briefly describe what you see in this image from my doorbell camera. Your message needs to be short enough to fit in a phone notification. Do not describe stationary objects or buildings.
image_filename: "{{ response['stdout'] }}"
response_variable: content
- service: tts.speak
target:
entity_id: tts.piper
data:
media_player_entity_id: media_player.google_mini
message: "{{ content.text }}"
cache: false
- service: notify.ios_1
data:
message: "{{ content.text }}"
data:
image: >-
/api/nest/event_media/{{ trigger.event.data.device_id }}/{{ trigger.event.data.nest_event_id }}/thumbnail
- variables:
content: "{{ content }}"
- stop: end
response_variable: content
this works but i dont think i am properly dealing with the variables and the stop actions
I don’t see anything wrong with the stop action and response variable. You can check out this post for an example on how to utilize it: https://community.home-assistant.io/t/2023-7-responding-services/588733/260?u=mekaneck
I don’t see any point of defining the variable context when it is already defined by the Google service call. You should be able to delete the variables: section completely.
@gleaming hinge - stop: end basically clears the variable correct? I keep getting errors that show double of what the shell comand produces. its a url basically and it ends up repeating the url a second time sometimes