I think this is wrong but ........

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
davecason
Normal user
Posts: 11
Joined: 18 Mar 2018, 18:02

I think this is wrong but ........

#1 Post by davecason » 20 Feb 2020, 02:14

Hello,

Does anyone know if this is right for rule to sent a email?


Box#Temp do
if [Box#Temp]<97
notify,1,"Box temperature is [Box#Temp]°F!"
endif
endon


Cheers'
Dave :o

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: I think this is wrong but ........

#2 Post by ThomasB » 20 Feb 2020, 03:08

I see a typo on first line; Should be:

Code: Select all

on Box#Temp do
In case it matters, I would omit the first comma seen in your notify. Should be:

Code: Select all

notify 1, "Box temperature is [Box#Temp]°F!"
- Thomas

davecason
Normal user
Posts: 11
Joined: 18 Mar 2018, 18:02

Re: I think this is wrong but ........

#3 Post by davecason » 20 Feb 2020, 03:33

Hi Thomas,

Well thanks for the prompt reply - that was great !

So more like this, right !?


on Box#Temp do
if [Box#Temp]<97
notify 1,"Box temperature is [Box#Temp]°F!"
endif
endon


Cheers'
Dave

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: I think this is wrong but ........

#4 Post by TD-er » 20 Feb 2020, 14:28

Parsing of command parameters is maybe a bit counter-intuitive some times, but in the last few builds I made it a bit more user friendly.
See: https://espeasy.readthedocs.io/en/lates ... er-parsing

So the first comma should work also, as will the space.
When in doubt of strings not working, please try first to remove non standard ASCII characters, like the degree sign.
You can also replace that one with {D} See the system variables page on the node for more of these examples.

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests