Get humidity from weather platform?

I’m setting up a custom graph and it works with my sensors, I just want to add the outside temperature and humidity from the weather platform. This is what I have on Developer tools:

image

Now my question is, when I do weather.home I get the temperature on the graph. But how do I get the humidity? weather.humidity don’t work, neither weather.home.temperature.

type: 'custom:mini-graph-card'
name: CLima em Casa a 6 meses
icon: 'mdi:server'
hours_to_show: 1440
entities:
  - sensor.humidity_158d0001b91088
  - sensor.temperature_158d0001b91088
  - sensor.humidity_158d0001e4c4f5
  - sensor.temperature_158d0001e4c4f5
  - weather.home
1 Like

hello, in your configuration.yaml

sensor:
  - platform: template
    sensors: 
      weather_home_temp:
        value_template: "{{ state_attr('weather.home', 'temperature') }}"
        friendly_name: 'temperature_ext'
        unit_of_measurement: 'c°'

edited " "

2 Likes

Thanks mate, but that is going to give me the temperature outside, not the humidity.
That’s my difficulty, because I need the humidity, weather.home just gives me the temperature.

I’m trying your example just switching the temperature to humidity but it’s not easy

Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/configuration.yaml”, line 38, column 9
expected , but found ‘’
in “/config/configuration.yaml”, line 38, column 41

sensor:
  - platform: template
    sensors: 
      weather_home_temp:
        value_template: '{{ state_attr('weather.home', 'humidity') }}'  
        friendly_name: 'humidity_ext'
        unit_of_measurement: '%'

You need either double quotes outside the curly brackets and single quotes inside or vice versa. Change the value_twmplate to:

value_template: "{{ state_attr('weather.home', 'humidity') }}"
2 Likes

And the newbie strikes again :smiley:

Thank you, that’s it.