I have 6 temperature sensors inside a group. It is shown below and has the value “unknown”:
Instead of “Unknown” being displayed, I would like to show the average value of the 6 temperature sensors, which is shown in the line above in the picture. I already have a custom sensor that calculates and displays the average value. Here is the configuration.yaml code to get the average value:
avg_house_temp:
friendly_name: 'House Average Temperature'
unit_of_measurement: '°F'
value_template: >-
{{ ((states('sensor.master_bedroom_temperature')|float + states('sensor.living_room_temperature')|float + states('sensor.hall_thermostat_temperature')|float + states('sensor.hannahs_room_temperature')|float + states('sensor.poop_closet_temperature')|float + states('sensor.craft_room_temperature')|float) / 6) | round(1) }}
The custom sensor displays the average temperature without any issues. The group of the 6 sensors is nice to have since when I click on it, it shows each individual sensor like this:
I would like to just have one item in the state card that shows the average value and when I click on it, it shows each sensor individually. If I could replace the “unknown” state value with the average temperature value, I would be all set.
Is there a way to do this?