if (gg("Sensor_light02.value") == 0)
sg('Max_disp.light', 0);
if ((gg("Sensor_light02.value") > 100) and (gg("Sensor_light02.value") <= 500))
sg('Max_disp.light', 2);
if ((gg("Sensor_light02.value") > 500) and (gg("Sensor_light02.value") <= 2000))
sg('Max_disp.light', 4);
if ((gg("Sensor_light02.value") > 2000) and (gg("Sensor_light02.value") <= 5000))
sg('Max_disp.light', 6);
if ((gg("Sensor_light02.value") > 5000) and (gg("Sensor_light02.value") <= 10000))
sg('Max_disp.light', 8);
if (gg("Sensor_light02.value") >= 15000)
sg('Max_disp.light', 12);