Help with multiple sensors mixing up data in groups

I have set up a NODEMCU with a DHT11 sensor and a Sonoff basic with a DHT11 in different rooms. In Home Assistant, have set up groups for each room but for some reason on my Overview page, the humidity levels are swapped showing the other room’s humidity. I have tried to swap the names for the humidity sensor in my Groups.yaml file but it did not change the result. I am stumped.

I have attached the code I used in my Groups.yaml file for you to dissect.

Garage Door:
name: Garage
view: no
control: hidden
icon: mdi:garage
entities:
  - cover.garage
  - sensor.humidity 
  - sensor.temperature
  
 Basement Bathroom:
name: Basement Bathroom
view: no
control: hidden
entities:
  - sensor.humidity_2 
  - sensor.temperature_2

you aren’t using lowercase or underscores instead of spaces and your spacing seems to be off.

garage_door:
  name: Garage
  view: no
  control: hidden
  icon: mdi:garage
  entities:
    - cover.garage
    - sensor.humidity 
    - sensor.temperature
  
basement_bathroom:
  name: Basement Bathroom
  view: no
  control: hidden
  entities:
    - sensor.humidity_2 
    - sensor.temperature_2

I fixed the lowercase and spacing issue but the sensors are still mixed up. After restarting HA the temperature sensor for each group are in the incorrect room now.

can you verify that sensor.humidity_2 is the sensor you think it is? Look in the states page. If the values match, swap them in the groups.

Hey Petro,

Unfortunately, this doesn’t work. After restarting HA, both sensors now show up in the wrong group even when I unplugged the other groups sensors. From what I am observing, HA assigns the name of the sensor in the order it is received after a restart. Is there a way in Tasmota to identify the sensor portion so HA doesn’t have to? <---- I hope this makes sense.

Yes, don’t use discovery, configure the component by hand.