Skov Posted April 17, 2023 Share Posted April 17, 2023 Hi UD community I have a Polisy with mostly Insteon devices. I setup a notification via the mobile app when my garage has been open for 30 minutes, I have a program which runs when the garage is open and sends notifications every 30 minutes. I'd like to include the value of a variable (number with 1 decimal place) in the notification but am not having success, the notification text sends and appears on my mobile but instead of including the number value delivers a blank space where the variable should be. The network resource has the 'body' set to this .. title=Garage Open&body=The Garage has been open for ${var.1.decGarageOpenTime} hours -- The variable format from here - have tried a few variations. https://wiki.universal-devices.com/index.php?title=ISY-994i_Series:EMail_and_Networking_Substitution_Variables Anyone got this working? Thanks Link to comment
Solution MrBill Posted April 17, 2023 Solution Share Posted April 17, 2023 2 minutes ago, Skov said: The network resource has the 'body' set to this .. title=Garage Open&body=The Garage has been open for ${var.1.decGarageOpenTime} hours Try it with the variable ID number instead of the name. ${var.1.12} Or whatever number your is... According to the wiki, it should also work with variable name Substitution variables are available inside custom email definitions in the form ${<variable name>} which would seem to transalte to ${decGarageOpenTime} in your case, I've never used names in the substitutions tho, i've already recently become away of the name form. 1 Link to comment
Skov Posted April 17, 2023 Author Share Posted April 17, 2023 18 minutes ago, MrBill said: Try it with the variable ID number instead of the name. ${var.1.12} Hi MrBill .. using the variable ID number worked! Thank you. For completeness I also tested the ${<variable name>}, in my case ${decGarageOpenTime}, but it included the that text in the message instead of the value. Will stick with the variable ID. Thanks again. 1 Link to comment
Recommended Posts