Adding multiple sensors values into one!

I use min max

sensor:
  - platform: min_max
    name: "Main Floor Average Temperature"
    type: mean 
    round_digits: 1
    entity_ids:
      - sensor.multisensor_6_air_temperature
      - sensor.kitchen_flood_sensor_air_temperature_2
      - sensor.main_floor_temperature
      - sensor.mil_bath_leak_sensor_air_temperature_2
      - sensor.mud_room_fibaro_air_temperature_2
1 Like

I have very similar code and I am getting unknown error when I look at it in developers tools.
My code is:

sensor:
  - platform: min_max
    entity_ids:
      - sensor.17_seaview_avenue_current_temp
      - sensor.dark_sky_current_temp
      - sensor.tasmota_outside_temp_ds18b20_temperature_2
    type: mean
    round_digits: 1
    name: Outside_Aveage_Temp

All three of the sensors give a reading in developers tools. Any ideas how to troubleshoot this?
Mine now works.
The issue I had was the default unit of measure on the template sensors was different.

got a question on this… (hoping I just missed something in my config…)
I am getting a phantom watt reading when all lights are off:

image

Here’s my template for this:

and when some of the lights are on…
image

… Also noticed even when a bulb is “OFF”, it shows a reading of 0.4 W (is this my issue and maybe just a residue/discharge of energy for zigbee?)

I would assume it’s from the power draw of the smart plug itself (radio, LED, etc). Commonly called “vampire load”.

I know this is a bit of a necro but I wanted to say thanks! This was the best example I found for this, and is still relevant in 2023.

Cheers!

My Yaml template cannot being used as it’s a non-numeric value

Screenshot 2023-07-31 at 14.02.48

My code is like this:

template:
  - sensor:
      - name: "current_power_usage"
        unit_of_measurement: "W"
        device_class: power
        state: >
          {{ [ states('sensor.phase_a_power')| float(0) + 
               states('sensor.phase_b_power')| float(0) +
               states('sensor.phase_c_power')| float(0) +
               states('sensor.envoy_solar_panels_current_power_production')| float(0)] }}
        availability: >
          {{ not 'unavailable' in 
             [ states('sensor.phase_a_power'), 
               states('sensor.phase_b_power'),
               states('sensor.phase_c_power'),
               states('sensor.envoy_solar_panels_current_power_production')] }}

It’s probably simple, but what can I do to use it in a Gauge?

Because you’re returning a list…


        state: >
          {{ states('sensor.phase_a_power')| float(0) + 
             states('sensor.phase_b_power')| float(0) +
             states('sensor.phase_c_power')| float(0) +
             states('sensor.envoy_solar_panels_current_power_production')| float(0) }}
Application of this format generated  this errormessage in dev_tools:

ValueError: Template error: float got invalid input 'unknown' when rendering template 

template:
  -sensor:
      - name: "Total Charging Power"
        unit_of_measurement: "W"
        device_class: power
        state: >
          {{ [ states('sensor.sessy_d5mr_charge_power' ), 
               states('sensor.sessy_dma4_charge_power' )]
               | map('float') | sum }}
        availability: >
          {{ not 'unavailable' in 
             [ states('sensor.sessy_d5mr_charge_power'), 
               states('sensor.sessy_dma4_charge_power') ] }}' 

but no default was specified.

How to solve?
Or just an initialisation issue?

map('float', default=0)

You should start a new topic in future for new issues.

Thanks!
Will do …

Cool, thanks.

In case you missed it: I did give you the solution in my previous message. You just need to provide a default.

You could use Group helper and add the sensors you want, chose Sum as type and it will add all of the entities values together.