Page 1 of 1

Cant get this to work as I'd like.

PostPosted: Sat Apr 15, 2017 4:12 pm
by Indy_Larry
Hi Everyone,

I started off doing all of my scripting in AppleScript and I'm now starting to move them to Python. I don't do much scripting, but was copying this from the Indigo Domotics examples. I'm sure this is a quick fix.

Here's what I'm wanting the email that is sent to me to look like:

Currently the house is:
Empty

The double overhead door is:
Open

My script follows
Code: Select all
theGarage=indigo.variables[1097948011] # double overhead garage door status
theHome=indigo.variables[1193800598] # "Home Status"

theSubject = "Status of Double Overhead Garage Door"
theBody = "Currently the house is: \n %s" % (theHome.value), "The double overhead door is: \n %s" % (theGarage.value)
indigo.server.sendEmailTo("xxxxx@me.com", subject=theSubject, body=theBody)


Thanks for you help in advance

Re: Cant get this to work as I'd like.

PostPosted: Sat Apr 15, 2017 4:32 pm
by FlyingDiver
Code: Select all
theBody = "Currently the house is: \n %s\n\nThe double overhead door is: \n %s" % (theHome.value, theGarage.value)

Re: Cant get this to work as I'd like.

PostPosted: Sat Apr 15, 2017 6:19 pm
by Indy_Larry
Thanks Joe,

That works perfectly.