How to access to .cfg defined vars?

I like @watou’s idea best of all. In the mean time I centralize all such activities into one place using the Separation of Behaviors Design Pattern.

The tl;dr is create an Item which you send a command to. This Item triggers a rule to do the action. So in this case I would have a Notification String Item and I’d sendCommand(Message) and centralize all my NMA triggers in the one rule that gets triggered by the Notification action.

This is a great way to centralize notification and alerting logic so you don’t have to spread API logic all over the place and it makes it easy to swap your alerting out if you decide to use other services. It also lets you set up logic so at certain time of day you can alert in one way and use an alternative at other times of day (e.g. use NMA during the day but sendMail at night).