Can't display all entities on same history graph card

I have two templates to get outside temperature & humidity, like this:

image

My goal is to display both temperature and humidity of all my sensors as well as the from the weather platform (converted using template), on the same graph.

Then my configuration card:

type: history-graph

entities:
  - entity: sensor.temperature_158d0001b91088
  - entity: sensor.template_temperature_exterior
  - entity: sensor.humidity_158d0001b91088
  - entity: sensor.humidity_158d0001e4c4f5
  - entity: sensor.template_humidade_exterior
  - entity: sensor.temperature_158d0001b91088
hours_to_show: 18
refresh_interval: 0
title: Clima em casa a 18 horas

And the fantastic result:

image

As you can see I have two different issues:

  • The obvious, why is it splitting in three different graphs? Can I avoid that?
  • For some reason unlike the template for the outside temperature, I have the sensor.template_humidade_exterior on the same graph as the internal humidity sensors. However, is not shown, despite the fact (as you can see in the screenshot of the developer tools), that it has a current value.

Using the core history graph you can only graph one unit of measurement per graph ( %, °C, and C in your case). So all % sensors on one graph, all C sensors on another.

You need to change the unit of your external temperature sensor to °C if you want it on the same graph as the other temperature sensors.

1 Like

Yep, that’s it. But I’m struggling with dealing with the temperature, because I get a graph with “C” and another one as “°C” if I use “degrees” as unit of measurement.

So in short,

unit_of_measurement: “°C” - error below
unit_of_measurement: “ÂșC” - error below
unit_of_measurement: “°degrees” -> appears graph with “C” (which is a problem because the one from the sensors come with ÂșC

Error loading /config/configuration.yaml: ‘utf-8’ codec can’t decode byte 0xb0 in position 1119: invalid start byte

I think that’s the wrong ° sign, there are two different ones and one of them doesn’t work.

Try this:

device_class: temperature
unit_of_measurement: "°C"
2 Likes

What text editor are you using to edit your files?

You need to save the file with an UTF-8 encoding.

Yeah there are definitely two different characters there:

1 Like

Didn’t know that, changed encoding and now it says configuration valid.

However I still have two graphs, the one from the template no matter what I choose from the above, it shows like this:

image

That will disappear in 24 hours. It’s from before you changed the unit. Notice how the data stops before the right hand end of the graph?

1 Like

Ok, just to be sure then, is the below correct?

unit_of_measurement: "°C

Searching google for the ° you used shows it is the degree symbol. But you forgot a closing double quote.

unit_of_measurement: "°C"
1 Like

Yes I know, I realised when I saved and checked configuration.

Thanks for all your help.

1 Like