Hello community. I can’t seem to be able to use 2 replacement variables with an attachment in a Pushover messages. Here’s the code snippet:
This returns the correct wind speed but does not include the attachment. Attachments work as expected by removing the wind speed template.
data:
title: " BSMT - Vibration Alert"
data:
sound: none
priority: 0
attachment: /config/www/clips/{{ states.input_text.cam_snap_timestamp.state }}.
message: >-
Wind Speed is {{states('sensor.weather_home_wind_speed') }}kph and may be a
factor
action: notify.pushover
I am also unable to use HTML formatting with the replacement variable.
I’ve included the complete event below in case someone wants to use it. This is a work in progress as it needs more re-usable code. I have many Vibration sensors and would like to use one set of notifications for all 20 sensors but want the correct sensor names and 2 camera snaps from nearby cameras and the wind speed included in the notifications. As it stands I group sensors into areas and having generic non-tailored notification, so I am not sure exactly which sensor was triggered.
alias: Vibration - BSMT
description: PO w pic & Persistent notifications with timestamp for BSMT cameras
triggers:
- entity_id:
- binary_sensor.bsmt_sw_vib_l_vibration
to: "on"
id: BSMT SW L Vibration
trigger: state
enabled: true
for:
hours: 0
minutes: 0
seconds: 0
- entity_id:
- binary_sensor.bsmt_sw_vib_m_vibration
to: "on"
id: BSMT SW M Vibration
trigger: state
enabled: true
for:
hours: 0
minutes: 0
seconds: 0
- entity_id:
- binary_sensor.bsmt_sw_vib_r_vibration
to: "on"
id: BSMT SW R Vibration
trigger: state
enabled: true
for:
hours: 0
minutes: 0
seconds: 0
- entity_id:
- binary_sensor.bsmt_se_vib_vibration
to: "on"
id: BSMT SE Vibration
trigger: state
enabled: true
for:
hours: 0
minutes: 0
seconds: 0
- entity_id:
- binary_sensor.bsmt_vib_6_vibration
- binary_sensor.bsmt_vib_9_vibration
to: "on"
id: BSMT Sliders Vibration
trigger: state
enabled: true
for:
hours: 0
minutes: 0
seconds: 0
- entity_id:
- binary_sensor.bsmt_nw_vib_vibration
to: "on"
id: BSMT NW Vibration
trigger: state
enabled: true
for:
hours: 0
minutes: 0
seconds: 0
- trigger: event
event_type: ""
id: Manual Trigger
conditions:
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.alarm_partition_1
state: armed_home
- condition: state
entity_id: alarm_control_panel.alarm_partition_1
state: armed_away
- condition: trigger
id:
- Manual Trigger
actions:
- data_template:
value: BSMT_{{ now().strftime('%b-%d_%H.%M.%S') }}
entity_id: input_text.cam_snap_timestamp
action: input_text.set_value
- data:
filename: /config/www/clips/{{ states.input_text.cam_snap_timestamp.state }}.jpg
action: camera.snapshot
target:
entity_id: camera.bsmt_sw_222
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
enabled: true
- data:
message: ""
title: Vibration - BSMT
action: persistent_notification.create
- data:
title: Alert
message: Vibration - BSMT
data:
sound: pushover
priority: 0
attachment: /config/www/clips/{{ states.input_text.cam_snap_timestamp.state }}.jpg
action: notify.pushover
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
enabled: true
- data_template:
value: PATIO_{{ now().strftime('%b-%d_%H.%M.%S') }}
entity_id: input_text.cam_snap_timestamp
action: input_text.set_value
- data:
filename: /config/www/clips/{{ states.input_text.cam_snap_timestamp.state }}.jpg
action: camera.snapshot
target:
entity_id: camera.192_168_10_219
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
enabled: true
- data:
message: ""
title: Vibration - BSMT
action: persistent_notification.create
- data:
title: " BSMT - Vibration Alert"
data:
sound: none
priority: 0
attachment: /config/www/clips/{{ states.input_text.cam_snap_timestamp.state }}.jpg
message: >-
Wind Speed is {{states('sensor.weather_home_wind_speed') }}kph and may
be a factor
action: notify.pushover
mode: single