two temperature sensors and two led

i want control two temperature sensors and two led
if the temperature one > 32,than the led1 will light
and the temperature two > 32 ,than the led2 will light

this is my code

#include <OneWire.h>
#include <DallasTemperature.h>
#include <NewSoftSerial.h>
const int led1 = 12;
const int led2 = 13;

#define ONE_WIRE_BUS 9

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

void setup()
{
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
Serial.println("Temperature Sensor");
sensors.begin();
}

void loop(void)
{
sensors.requestTemperatures();
Serial.println(sensors.getTempCByIndex(0));
Serial.println(sensors.getTempCByIndex(1));

float room1 = sensors.getTempCByIndex(0);
if(room1>32.00)
{
digitalWrite(led1,HIGH);
delay(1000);
return;
}
if(room1<32.00)
{
digitalWrite(led1,LOW);
delay(1000);
return;
}
float room2 = sensors.getTempCByIndex(1);
if(room2>32.00)
{
digitalWrite(led2,HIGH);
delay(1000);
return;
}
if(room2<32.00)
{
digitalWrite(led2,LOW);
delay(1000);
return;
}
}

but the sensors.getTempCByIndex(1) > 32 , the led2 didn't light.
why it didn't.please help me. :cold_sweat:

return;

That's the reason for the failure. If temperature 1 is either below or above 32°C you set the LED on or off and then you return out of the loop, so the rest of the code is not reached. Only in the very seldom case of exactly 32°C the rest is even considered.