Multiple temperature sensors in one

Hi everyone,

I’m using HA for quite a while now and I’ve set up almost everything to my needs, but there’s one thing I miss greatly: The ability to show multiple temperatures in one graph, like below:
image
(Image from Google)
I know that HA can do it, but I’m not sure about multiple sensors in one.
I didn’t find anything in the documentation on how to combine some sensors together.
If there’s a way, I would be glad if someone would show me on how it can be done.
If not, what do I need to modify/add in order to accomplish such feature?

Thanks in advance.

I took a stab in the dark at this a couple of weeks ago

history_graph:
  gr1:
    name: Temperatures
    hours_to_show: 24
    entities:
      - sensor.house_temp
      - sensor.dark_sky_apparent_temperature

I think that all entities have to be of the same type, and you can obviously set the duration to show.

1 Like

Yep, that works:

image

All the entities should have unit_of_measurement specified, and it helps if all the entities in the same graph have the same unit_of_measurement.

Thank you.
Yeah, I’ve already seen history_graph, but as far as I know it only works if you go in “History”, but I want it to show up in the “Home” section as a sensor.
Will it work in the “Home” section?

Sorry, that is defining an object in the configuration.yaml file. You can then go to the groups.yaml file and add that object (in this case gr1) into whichever group (view) you want it to be in.

I’ll try it tomorrow at daytime and will reply here if it worked.
(I can’t now, because it’s night and the entire house depends on HA - every single lamp. It’s crazy. I know. And I like it - a lot.)

Sorry, I just double checked because I want to see it in lovelace and realized I was wrong about something
The entityId is history_graph.temperatures

History graph is meant to be used in a card in the Home section whereas History is a separate panel. They both use Recorder and look identical.

https://www.home-assistant.io/components/history_graph/

Have you thought about do it with InfluxDB and Grafana?

Makes some amazing graphs with crazy flexibility.

Sorry for the late reply, but it worked. It wonderfully created a card graph in the Home section with both sensors I put there.

Thanks to everyone who contributed here.

@Valentino_Stillhardt Hi, Would you mind sharing the code you used in the different config files, and maybe the setup on the dashboard? Thank you.

2 Likes

Hi, Would you mind sharing the code you used in the different config files, and maybe the setup on the dashboard? Thank you.

@Mithrox, @o08
Please use this as an example in your UI. You can even set friendly names

type: history-graph
title: Temperatury
entities:
  - entity: sensor.esp_kotlownia_temperatura_bojler
    name: Bojler
  - entity: sensor.esp_kotlownia_temperatura_solary
    name: Solary
  - entity: sensor.openweathermap_temperature
    name: Zewnątrz
hours_to_show: 24
1 Like