Cant get this to work as I'd like.

Posted on
Sat Apr 15, 2017 4:12 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Cant get this to work as I'd like.

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
Last edited by Indy_Larry on Sat Apr 15, 2017 6:26 pm, edited 1 time in total.

Larry

Insteon, Z Wave, Hue, Sonos

Posted on
Sat Apr 15, 2017 4:32 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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

Code: Select all
theBody = "Currently the house is: \n %s\n\nThe double overhead door is: \n %s" % (theHome.value, theGarage.value)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Apr 15, 2017 6:19 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

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

Thanks Joe,

That works perfectly.

Larry

Insteon, Z Wave, Hue, Sonos

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests