Control simultaneous 5 entity ( 5 esp32 dht11) in same door

Hi at all,
In My project I want control 5 or 6 esp32 with dht11 in same time or automatic when change the humidity
This automation control fan in e out air in my house.
Can i help me?

thanks in advanced.

Agostino

Well you could help yourself considerably by using DH22s instead of DHT11.

DHT11s are junk.

Then use ESPHome:

It works well with home assistant and even supports automation on the device.

ok i consider DH22s. my question is:
is possible include 5 different entity in a single file YAML?
thanks

The YAML can easily handle it.
The question is if you can find enough pins on the ESP that can want the DHT22 needs and that do not act weird on boot when something is connected to them then.

sorry maybe I explained myself wrong. I have to connect the dht22 to different esp32.
So a tdt22 for each esp32. then I should read all the data of the esp32 thd22 placed in different points of the house, in a single yaml

The YAML file does not read the data. It creates the sensors and HA then populate the data when the ESPs report in with new values.
It is a push from the ESPs that deliver the data not a pull from HA.

Are you in a Home Assistant “environment”?
Then you can use this if not you can try this.
Each of the esp connected to the DH22 would read the temperature, then send it to Home Assistant then you can collect all data in another esp.

ok thanks i try.