I’ve been trying to save videos with Blink using the example on Blink’s integration page:
- id: save_blink_video_on_motion
alias: Save Blink Video on Motion
trigger:
platform: state
entity_id: binary_sensor.blink_my_camera_motion_detected
to: 'on'
action:
service: blink.save_video
data:
name: "My Camera"
filename: "/tmp/videos/blink_video_{{ now().strftime('%Y%m%d_%H%M%S') }}.mp4"
Problem is that the videos are being saved as is “blink_video_{{ now().strftime(’%Y%m%d_%H%M%S’) }}.mp4” instead of blink_video_year_month_day_hour_minute_second".
Any ideas?
So I just tested it on my end and got the expected blink_YYmmdd_HHMMSS.mp4 syntax. So I’ve got no idea why it’s not working on your end. Hopefully someone with more jinja/templating expertise can comment.
Actually, I rescind my last statement. I was just checking the template syntax (which worked) but I actually think this is a bug with the save_video routine in the component. I’ll test some more when I get out of work to see if I can replicate and then fix this problem.
I did the changes that were on your PR and they are now recording correctly with the right name. One thing I notice is that some of the videos are corrupt (the file has 40 bytes) and it’s random. I will enable debug for blink and see if I get anything there, if I do, I will post here.