I also use average temperatures in my Home Assistant setup, but can’t duplicate your issue. I have the following in my configuration:
platform: min_max
type: mean
name: Average Indoor Temperature Zone A
entity_ids:
- sensor.averys_room_temperature
- sensor.guest_room_temperature
- sensor.guest_bathroom_temperature
- sensor.living_room_thermostat_temperature
- sensor.master_bedroom_temperature
If I look at these in the states page of Home Assistant, I can see they all have matching unit_of_measure. It may also be relevant that most of these are from MQTT but the thermostat is from the Nest component and one of my other sensors is Z-Wave (part of Zone B though).
I know in the past I had sensors come in with only F as the unit of measurement. Can you help us with some more of your configuration? It would be helpful to see where both of those sensors you are using for the mean are coming from.
I am not sure why the unit changes, but I am going to try adding this to my customize.yaml file to try and prevent the behavior. We’ll see if it works.
Specifying the unit_of_measurement did not help. It just put a °F symbol next to °C numerical values. I then tried to specify the device_class as temperature and that didn’t help either. Same issue of the units changing from °F to °C when the sensor is ‘unknown’.
You could use a template sensor and template the value conversion from °C to °F. I know for my xiaomi sensors I had to translate their reported temperature (which was in Celsius) to Fahrenheit. Since I was getting the value from MQTT, I just modified the value_template for my MQTT sensor.