Is Multi line Automation Message possible?

Hi

I would like to know if its possible to have a multi line automation message as I would like to see a few states and in 1 line its very messy.

Ive tried \n and even a + but they dont work

Thanks

Martyn

There are two ways to use multiline: | and >

You can use a - or a + after it to redact or add an extra line at the end.

action: |
  Your actions.

please read this, very useful stuff.

2 Likes

Does this actually work in automation messages as I have tried a couple of different permutations but nothing seems to work ?

message: Outside Temp is {{states.weather.home.attributes.temperature }}
Living Room Temp is {{states.living_room.attributes.temperature}}

Id like both in separate lines

Thanks

ok. please read this before posting anything else.
to put is short - we cannot help you based only on your words without seeing your code (properly formatted by enclosing it in three back quotes).
adios

1 Like

Mine work formatted like this:

message: >- 
  Outside Temp is {{states.weather.home.attributes.temperature }}
  Living Room Temp is {{states.living_room.attributes.temperature}}

good!
and you want these two lines to be separate, right?
have you read the page I referred you to?
it says “use > if you want newlines inside the block to be replaced by spaces” so it’s a wrong choice.
try message: |

and read that link, it’s very useful.

2 Likes

Yes it is useful thanks, I’ve now changed mine from >- to |- when I need lines separated

3 Likes

Hi

All now working and I now have 1 multi line smart messages that update rather than 5 separate automations.

Thank you

2 Likes