Home Assistant release with the issue:
0.100.1
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):
Official docker image
Integration:
html5
Description of problem:
Templates doesn't work in data/images
For example this doesn't work (I checked the .jpg, it exists):
- data:
data:
image: /local/cam_captures/living_room_{{ now ().year }}_{{ now ().month }}_{{
now ().day }}_{{ now ().hour }}_{{ now ().minute }}.jpg
service: notify.html5
But this works:
- data:
data:
image: /local/cam_captures/living_room_2019_10_10_21_15.jpg
service: notify.html5
If I send this template in the message it shows correctly.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
- id: '1558384749729'
alias: Motion while nobody is at home
trigger:
- entity_id: binary_sensor.living_room_motion
platform: state
to: 'on'
- entity_id: binary_sensor.living_room_camera_motion
platform: state
to: 'on'
condition:
- condition: state
entity_id: group.all_persons
state: not_home
action:
- data:
entity_id: camera.foscam_camera
filename: /config/www/cam_captures/living_room_{{ now ().year }}_{{ now ().month
}}_{{ now ().day }}_{{ now ().hour }}_{{ now ().minute }}.jpg
service: camera.snapshot
- data:
data:
image: /local/cam_captures/living_room_{{ now ().year }}_{{ now ().month }}_{{
now ().day }}_{{ now ().hour }}_{{ now ().minute }}.jpg
priority: high
tag: motion
ttl: 86400
message: Motion detected, but nobody is at home!
title: Motion!
service: notify.html5
Hey there @robbiet480, mind taking a look at this issue as its been labeled with a integration (html5) you are listed as a codeowner for? Thanks!
@MateEke You have to use data_template not data. Look here. Issue should be closed.
Most helpful comment
@MateEke You have to use
data_templatenotdata. Look here. Issue should be closed.