How to get an average between two sensors?

Hi, just trying to setup a weather dashboard.

I have been trying to get the average between two temperatures, but I am unable.

this is my card code

type: custom:mini-graph-card
entities:
  - entity: sensor.pirateweather_daytime_high_temperature_0d
  - entity: sensor.pirateweather_daily_low_temperature_time_0d
  - entity:
      sensor:
        - platform: min_max
          type: median
          entity_ids:
            - sensor.pirateweather_daytime_high_temperature_0d
            - sensor.pirateweather_daily_low_temperature_time_0d

any suggestion?

Remove this from the card, it does not belong there:

      sensor:
        - platform: min_max
          type: median
          entity_ids:
            - sensor.pirateweather_daytime_high_temperature_0d
            - sensor.pirateweather_daily_low_temperature_time_0d

It belongs in your configuration.yaml file. Or use the UI helpers menu to add it. Settings → Devices & Services → Helpers