Problem with Nextion

Hello everyone, I have a problem with the code.
I use arduino uno board, nextion display, relay, DHT11 sensor.

I have a working code to control the relay from the display. Everything is working.
Code:

/*
* Control de Ocho relays mediante Arduino Nano y pantalla NEXTION
*/
#include <SoftwareSerial.h>
#include <Nextion.h>

#define SI !1 
#define NO !0

byte rele[] = {4,5,6,7,8,9,2,3}; //Relay 1,2,3,4,5,6,7,8
const int ledPin = 13;    //LED pin
const byte ReceivePin = 11;
const byte TransmtPin = 10;
int i;
int recv; int trxv;
String message;

SoftwareSerial nextion(ReceivePin, TransmtPin);
Nextion myNextion(nextion, 9600);

boolean button1State = 0; boolean button2State = 0; boolean button3State = 0; boolean button4State = 0;
boolean button5State = 0; boolean button6State = 0; boolean button7State = 0; boolean button8State = 0;

void setup()
{
 Serial.begin(9600);
 myNextion.init();
 
pinMode(ledPin, OUTPUT);
 for (i = 0; i < 8; i++) 
  { pinMode((rele[i]),OUTPUT); digitalWrite((rele[i]),NO); }

 while (!Serial) {};

 } 

void loop() 
{
 // put your main code here, to run repeatedly:

 message = myNextion.listen(); //check for message
 if (message !="") { Serial.println(message);}
if (message == "65 1 2 0 ffff ffff ffff") {digitalWrite((rele[0]),button1State); button1State = !(button1State); }
if (message == "65 1 3 0 ffff ffff ffff") {digitalWrite((rele[1]),button2State); button2State = !(button2State); }
if (message == "65 1 4 0 ffff ffff ffff") {digitalWrite((rele[2]),button3State); button3State = !(button3State); }
if (message == "65 1 5 0 ffff ffff ffff") {digitalWrite((rele[3]),button4State); button4State = !(button4State); }
if (message == "65 2 2 0 ffff ffff ffff") {digitalWrite((rele[4]),button5State); button5State = !(button5State); }
if (message == "65 2 3 0 ffff ffff ffff") {digitalWrite((rele[5]),button6State); button6State = !(button6State); }
if (message == "65 2 4 0 ffff ffff ffff") {digitalWrite((rele[6]),button7State); button7State = !(button7State); }
if (message == "65 2 5 0 ffff ffff ffff") {digitalWrite((rele[7]),button8State); button8State = !(button8State); }

  
}
// Fin Loop
// Inicia los Relays en NO
// for (i = 0; i < 8; i++) // Prueba los Relays del 1 a 8 - Quitar de la compilacion para el uso normal
// { digitalWrite((rele[i]),SI); delay(50);  digitalWrite((rele[i]),NO); delay(50); }

And there is another code that gives the temperature sensor values to the display.
Code:

#include <SoftwareSerial.h>
#include <Nextion.h>
#include "DHT.h"

#define DHTPIN 5
#define DHTTYPE DHT11   // DHT 11 
DHT dht(DHTPIN, DHTTYPE);

SoftwareSerial nextion(2, 3);// Nextion TX to pin 2 and RX to pin 3 of Arduino

Nextion myNextion(nextion, 9600); //create a Nextion object named myNextion using the nextion serial port @ 9600bps

void setup() {
 Serial.begin(9600);
 myNextion.init();
dht.begin();
}

void loop() {

 float h = dht.readHumidity();
 float t = dht.readTemperature();

 myNextion.setComponentText("t0", String(t));
 delay(1000);

 myNextion.setComponentText("t1", String(h));
 delay(1000);
 
}

I have no way to combine all this into one code, when trying to combine sketches, the relay does not work for me, but it shows the temperature.

Here is an example of the code that is still coming out, with it the relay stops working:

#include <SoftwareSerial.h>
#include <Nextion.h>
#include "DHT.h"

#define SI !1 
#define NO !0
#define DHTPIN 5
#define DHTTYPE DHT11   // DHT 11 
DHT dht(DHTPIN, DHTTYPE);



byte rele[] = {4,15,6,7,8,9,2,3}; //Relay 1,2,3,4,5,6,7,8
const int ledPin = 13; //Led
int i;
int recv; int trxv;
String message;
const byte ReceivePin = 11;
const byte TransmtPin = 10;

SoftwareSerial nextion(ReceivePin,TransmtPin);
Nextion myNextion(nextion,9600);

boolean button1State = 0; boolean button2State = 0; boolean button3State = 0; boolean button4State = 0;
boolean button5State = 0; boolean button6State = 0; boolean button7State = 0; boolean button8State = 0;


void setup() {

 Serial.begin(9600);
 myNextion.init();
 dht.begin();


pinMode(ledPin, OUTPUT); 
 for (i = 0; i < 8; i++) 
  { pinMode((rele[i]),OUTPUT); digitalWrite((rele[i]),NO); }

  while (!Serial) {};
}

void loop() {

 message = myNextion.listen(); //check for message
if (message !="") { Serial.println(message);}
if (message == "65 1 2 0 ffff ffff ffff") {digitalWrite((rele[0]),button1State); button1State = !(button1State); }
if (message == "65 1 3 0 ffff ffff ffff") {digitalWrite((rele[1]),button2State); button2State = !(button2State); }
if (message == "65 1 4 0 ffff ffff ffff") {digitalWrite((rele[2]),button3State); button3State = !(button3State); }
if (message == "65 1 5 0 ffff ffff ffff") {digitalWrite((rele[3]),button4State); button4State = !(button4State); }
if (message == "65 2 2 0 ffff ffff ffff") {digitalWrite((rele[4]),button5State); button5State = !(button5State); }
if (message == "65 2 3 0 ffff ffff ffff") {digitalWrite((rele[5]),button6State); button6State = !(button6State); }
if (message == "65 2 4 0 ffff ffff ffff") {digitalWrite((rele[6]),button7State); button7State = !(button7State); }
if (message == "65 2 5 0 ffff ffff ffff") {digitalWrite((rele[7]),button8State); button8State = !(button8State); }
else{
 float t = dht.readTemperature();
 myNextion.setComponentText("t0", String(t));
 message="1";
}
 
}

Help to combine the first two codes into one, it is necessary that the c board on the display was known for temperature, and from the display to the board, the relay control.

Your combined code does something. It is not clear what it does.

Why do you measure the temperature only if message is not "65 2 5 0 ffff ffff ffff"? Seems to me like that is something you want to do every time (or every so often, but independent of what the Nextion sends you).