Page 1 of 1

email thermostat value problem

Posted: Monday 28 August 2017 10:18
by Nomader
i am trying to send an email whenever the thermostat changes state, i use the following:

Code: Select all

commandArray[1]={['SendEmail']='Thermostat_value_has_changed# My new setpoint is {{utilitydevice[245]}} degrees #[email protected]'}
the email is sent ok but all i get is:


My new setpoint is {{utilitydevice[245]}} degrees

and not the actual value.. the idx is correct
i also tried

Code: Select all

{{temperaturedevice[245]}}
but no luck either

Re: email thermostat value problem

Posted: Tuesday 29 August 2017 11:27
by SweetPants
You need to construct the message the LUA way. Google is your friend.
Hint, you have to concatenate strings/values like <string> .. <value as string> .. <string>.\
What happens if you print {{utilitydevice[245]}}, what do you see in the log?