Min Max sensor

Hi folks,

another day, another problem. I’m trying to get an average temperature reading from my sensors, but the min max sensor doesn’t seem to want to play nice. Can anyone spot what I’m doing wrong below?

# Get average house temperature
  - platform: min_max
    sensors:
      house_avg:
        friendly_name: "House"
        # Type - min, max, or mean
        type: mean
        entity_ids:
          - sensor.hall_sensor_temperature
          - sensor.hue_motion_sensor_1_temperature
          - sensor.kitchen_sensor_temperature
          - sensor.landing_sensor_temperature
          - sensor.aeon_labs_zw074_multisensor_gen5_temperature

I’d be grateful for any help

sensors: should not be below platform (also it’s has to be"sensor:" and not “sensors”) and I don’t think friendly_name is a valid option.

sensor:
  - platform: min_max
    name: house_avg
    type: mean
    entity_ids:
      - sensor.hall_sensor_temperature
      - sensor.hue_motion_sensor_1_temperature
      - sensor.kitchen_sensor_temperature
      - sensor.landing_sensor_temperature
      - sensor.aeon_labs_zw074_multisensor_gen5_temperature

“- platform” is beneath “sensor:” along with several other platforms. I just didn’t show it, although in hindsight I probably should have. “sensors:” beneath “- platform” as far as I know is correct, unless that’s specific to the max min sensor.

I don’t see that in the docs for the sensor.

In my own system, I have two like this, without any problems.

- platform: min_max
  name: average_house_humidity
  type: mean
  entity_ids:
    - sensor.bedroom_humidity
    - sensor.living_room_humidity
    - sensor.office_humidity
- platform: min_max
  name: average_house_temperature
  type: mean
  entity_ids:
    - sensor.bedroom_temperature
    - sensor.living_room_temperature
    - sensor.office_temperature
1 Like

I think you’re making assumptions based on template sensors. Not all platforms are the same and you should always consult the docs.

Hmm, I may indeed be guilty of making an assumption. I’ll try again with your suggestions and see what happens. Thanks.

That did it. While I did look at the documentation, I made a few bad assumptions, so that’ll teach me! Thanks for the help.

2 Likes