Variables in custom notification URL

General Discussion

Variables in custom notification URL

Postby reickler » Mon May 16, 2016 3:59 pm

Hello,

I'm trying to add a {zone} variable in the Path field for a custom notification, but it doesn't appear to expand the variable.

As an example, I have something like this as my Path:

/contactSensor/zone{zone}/open
/contactSensor/zone{zone}/closed

When those requests reach their endpoint, it actually has {zone} in the URL instead of the actual zone number.

Are the variables only available in the notification body, or can I use them in any of the form fields like Path and Custom Keys?

Thanks,

Ron
reickler
newt
newt
 
Posts: 2
Joined: Mon May 16, 2016 3:51 pm

Re: Variables in custom notification URL

Postby kevin » Mon May 16, 2016 9:07 pm

The only available replacements are the ones currently shown when you add a field to the form. However, if you use {{message}} and then edit the custom message you see you can replace the zone id there - unfortunately if you want to do this per zone, you will need to add the zone filter to each notification and create one for each zone to achieve what you are looking for and you can define a custom key/value for each one that way.

We do no replacements on any paths, no
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Variables in custom notification URL

Postby reickler » Mon May 16, 2016 10:06 pm

Thanks for the info. I think I can achieve what I need by changing the fault and restored messages to just {zone} and then using {{message}} as a "custom value" as you suggested.
reickler
newt
newt
 
Posts: 2
Joined: Mon May 16, 2016 3:51 pm


Return to General

Who is online

Users browsing this forum: No registered users and 29 guests

cron