TTS file content

I would like to suggest the feature to allow a text or pdf file to be read a text or pdf file with TTS when it is present. Ideally the file would be discovered, read and then deleted.

I think this is a perfect job for automation. When the state changes of this sensor, get automation to TTS its state.

Thanks. This seems to only read the last line of a file. Anyway to get it to read a multi-line file?

I would create a python script to remove the line breaks from the file and get HA to run it as a shell command before doing the TTS.

So pass the whole paragraph as a single line of text, correct? Is there a size limit on how long the line can be?

Thanks for your help!

I am trying to reference a text file that I have placed in the same directory as the config.yaml file. I can’t for the life of me figure out what the path would be for the sensor. Any suggestions? Thanks in advance.