Adding a sensor type to a allert rule


I recently grabbed the Sensor over Limit - Check Healt settings from the Alert rule collection.
I only want to let the alert rule look at the temperature instead of every sensor. Later i want to copy the rule to make specific rules for different sensors (and also make specific templates for them).

Default it has this SQL query syntax:

SELECT * FROM devices,sensors WHERE (devices.device_id = ? AND devices.device_id = sensors.device_id) AND sensors.sensor_current > sensors.sensor_limit AND sensors.sensor_alert = 1 AND (devices.status = 1 && (devices.disabled = 0 && devices.ignore = 0)) = 1

Now i tried to add this at the end of the query:
AND sensors.sensor_type = "sensor_temperature"

The problem is that it doesnt work for me; i think i has to do with what i added at the end of the query.
I assumed that the sensor type is called Sensor_temperature when i looked at the URL when i clicked on a graph.

Any ideas how i can specify the sensor type for the alert rule?

Tahnks in advance!


is this the statement maybe u need?

sensors.sensor_type = "tempSensorStatusState"




What you want is

AND sensors.sensor_class = "temperature"

Thanks TheGreatDoc; this worked out for me!