#variables

1 messages · Page 1 of 1 (latest)

pseudo path
#
          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

gleaming hinge
#

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.

pseudo path
#

@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