Trying to create an automation and for the life of me can’t figure out why it won’t save.
Getting the following error
Message malformed: template value should be a string for dictionary value @ data['actions'][3]['data']
Here is my code
alias: Notification Front PTZ
description: >-
Send push notification to phones with an LLM description when a person is
detected at the front PTZ camera.
triggers:
- entity_id:
- binary_sensor.1_front_outside_ptz_person_detected
to: "on"
trigger: state
actions:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- data:
filename: /config/www/tmp/ptz_motion.jpg
target:
entity_id: camera.1_front_outside_ptz_high_resolution_channel
action: camera.snapshot
- action: llmvision.image_analyzer
metadata: {}
data:
include_filename: false
target_width: 1280
detail: low
max_tokens: 100
temperature: 0.2
expose_images: false
provider: 01JE9A5N52AH6YWBMMCE8ME2E1
model: gemini-1.5-pro
message: >-
Describe the image in one sentence. If you see a person, describe what
they look like. Make the description a bit cheeky.
remember: true
image_file: /config/www/tmp/ptz_motion.jpg
response_variable: response
- data:
message: |
{{ response.response_text }} {{
as_timestamp(states.binary_sensor.1_front_outside_ptz_motion.last_changed)
| timestamp_custom('%-I:%M %p (%m-%d-%y)') }}
title: Front PTZ Motion
data:
image: >
https://homeassistant.local:8123/local/tmp/ptz_motion.jpg?{{
as_timestamp(now()) }}
action: notify.mobile_app_iphone_jrock
enabled: true
mode: single