Email Action enhancement


#1

Would it be possible when using the email action and sending a string variable in the body of the email to have the email respect \n in the string and start a new line?


#2

If it helps, here is my use case.

I’m writing a list of actions for my vacation light piston to a variable - I have a running list of light changes going to that variable and then posting that list to the piston state and using \n in the variable to make the state list look nice. That works great.

I reset the variable once the vacation light timer is done. There are times that I don’t have time to check the piston state to see how the vacation light piston is working (I just like to keep an eye on it to see if it is sufficient or needs tweaking). So I want to send an email to myself with the variable that has the running list of light changes before resetting the variable. What I’m getting isn’t readable. See below. Keep in mind that what you see below looks perfect when used as piston state. If any one has another suggestion I’m happy to hear it. Thanks!


#3

You can insert "<br />" to achieve a new line in an email.

But it plays havoc with the text display inside the expression editor in webCoRE!

For example:

$dayOfWeekName "<br />" $monthName "<br />" $day

Will look like this in an email:

image

But displays like this in the expression editor:

image

But it works :smile:


#7

@ipaterson recommends putting the HTML tag in a variable so it doesn’t mess with the expression editor.


#8

@Robin

Would you happen to know how to add line for piston state thru expression?

both /n and < /br> rendered the expression box bugged.

Thanks!


#9

For my use case I’m using the \n when editing a variable and then just making the piston state the variable.

Works for me.


#10

@Kebel871

You’ve got the slash pointing the wrong way.

\r, \n, or \r\n should all translate into a new line on piston state

Also, hitting enter in the expression editor will form a new line.


#11

The expression editor is definitely buggy when you get a few lines in there. I prefer to see long commands broken up neatly into multiple lines, so I do most of my expressions in a text editor, and then just paste them in. Trying to edit a 6 line expression is nearly impossible within that window.