Issues with quotation marks

Hey guys,
I can successfully run this call service in home assistant, however node-red seems to be having issues with the " "

{
    "filename": "/config/www/cctv/ground_floor/{{ now().strftime('%Y%m%d') }}/gl_{{ now().strftime('%Y%m%d-%H%M%S') }}_motion.jpg"
}

Any ideas on the right course of action?

Kind Regards,
Dan

You have not given sufficient context. Where does the text you posted appear?

in home assistant

This is the home assistant developer service call, however, when called in node-red it doesn't create the file.

filename: /config/www/cctv/ground_floor/{{ now().strftime("%Y%m%d") }}/gl_{{ now().strftime("%Y%m%d-%H%M%S") }}_motion.jpg
entity_id: camera.ground_level_camera_image

it appears in the data section of the call service node:


Sorry, I don't know about that node. Are you sure the {{...}} syntax is valid there? If no-one here is able to help then maybe a HA forum would be a better bet.

As far as i am aware The {{..}} is not valid in json input field.

You would need to use function/template/change node to create the json and then feed it in by using dropdown msg.payload. Or use JSONata if available in dropdown.

1 Like

You could also escape the brackets, that should work.