Populating a csv file with response variable text, with timestamps

Hi all.

I have an automation that gives me a response variable output. It is a short line of text.
Does anyone have suggestions on how I can export that text to csv and add a timestamp?

I want all new responses to append to the file.

Would this be a good method to proceed with, or has someone done this better before?
Create a new sensor. During the automation, write response to the sensor value. Then use notify:file to write to csv?

The now() bit is the time and date.

You can use your variable directly in the template. No need for a sensor. e.g.

message: "{{ now(),my_variable }}"

Which is just as well, as this:

Isn’t an available service.

You could create a triggered template sensor instead of an automation if you really need it in a sensor.


Thanks. I’ll try that out :slight_smile: