- end
-
- local values = {}
- local printable = {}
-
- for sensor,sensor_params in pairs(sensor_data[web_id]) do
- if sensor ~= "timestamp" then
- for param,value in pairs(sensor_params) do
- local name = sensor.."."..param
- values[name]=value
- if a_formats[name] then
- printable[name]=string.format("%"..a_formats[name][1],value*a_formats[name][2])
- end
+ end
+
+ local values = {}
+ local printable = {}
+
+ for sensor,sensor_params in pairs(sensor_data[web_id]) do
+ if sensor ~= "timestamp" then
+ for param,value in pairs(sensor_params) do
+ local name = sensor.."."..param
+ values[name]=value
+ if a_formats[name] then
+ printable[name]=string.format("%"..a_formats[name][1],value*a_formats[name][2])
+ end
+ end
+ end
+ end
+
+ level = 1
+ alarms = ""
+
+ if not muted_beep then
+ for key,value in pairs(values) do
+ value_level = check_limit(key,value,limits)
+ if value_level > level then
+ level = value_level
+ alarms = a_names[key]
+ elseif value_level == level then
+ alarms = alarms.." "..a_names[key]
+ end