Hi,
There is a sensor alert part of the default templates, that’s probably the easier way you could have identified this.
But there is a dedicated page in the doc :
https://docs.librenms.org/Alerting/Macros/
The key you have to know is that all alerting is done based on the database (mysql) so if there is no check on a particular element, then it will just be ignored.