Min/max sensors not calculating correctly?

I have the wiser heat hub system with iTRVs on all of my radiators. I also have independent temperature sensors on the opposite sides of the room to the radiators. What I’m trying to do is take the temperature from the iTRVs and the independent sensors and make an average temp sensor for each room. I can then set automations based on this temp, to have a more accurate room temp.

Now for the issue I’m having… I have set all of this up in the config yaml file. The sensors all generate correctly, but only one reports the correct average. The others only report the temperature of the independent sensors. I have used template sensors as the wiser system uses climate entities. I pull the temperature from them, allowing me to use min/max sensors. They all report correctly, but the min/max sensors just ignore them (except for one). I’ve been wracking my brain but just can’t work out what’s wrong. Any ideas everyone?

Config yaml:

https://pastecode.io/s/1i0zd0na
(Couldn’t get the code to look right so sod it…)

What does the min_max sensors display in Developer tools?
I kind of doubt this could be it but you don’t actually need all those quotes.

      - platform: min_max
        name: Average Temperature Kitchen
        round_digits: 1
        type: mean
        entity_ids:
          - sensor.climate_kitchen
          - sensor.temperature_sensor_temperature

Thanks for the help. Turns out the issue was due to my assumption that the ‘unique id’ element designated the entity name. I should have just taken the name of the sensor with the spaces swapped with underscores. Correcting the names referred to in the min/max sensors fixed it :+1:

1 Like