DHT22 sensor raises mapping values are not allowed here

16-11-16 08:54:55 homeassistant.util.yaml: mapping values are not allowed here
in “/home/hass/.homeassistant/configuration.yaml”, line 85, column 15

is what I do see in my log file.

my yaml looks like and line 85 is the “sensor: DHT22” line:
sensor:
platform: yr
platform: dht
sensor: DHT22
pin: 04
monitored_conditions:
- temperature
- humidity

Remove “platform: yr” from your config - that is for the weather.

Can you repost your config. After you paste it in highlight it and hit the < \ > button just above where you type.

This will let the spacing/formatting display correctly so it can be checked. This may just be a spacing issue.

Also try putting the dht22 in lowercase letters. Sometimes HA doesn’t like capital letters.

This is my working config for an AM2302 sensor

sensor 11:
  platform: dht
  sensor: AM2302
  pin: 23
  name: Living Room
  monitored_conditions:
    - temperature
    - humidity

I have a
sensor:
platform: dht
sensor: DHT22
pin: 04
monitored_conditions:
- temperature
- humidity

and nothing on the screen and the log is empfy on that topic

Did you double check your wiring? Is your data wire plugged into GPIO 4 (not pin 4).

Also, have you given your HA user access to the GPIO?

Im assuming your on a PI…

If you used the all in one installer, run the command

sudo adduser hass gpio

If you used the hassbian image, run the command

sudo adduser homeasisstant gpio

The above adds your applicable HA user to use the GPIO pins. By default user Pi has access but the HA user (hass or homeassistant) does not.

Thanks for your replay.
I will try to query the DHT tomorrow from the cli.
THE GPIO Pin is what I have used on the PI 3.
The sudo adduser hass gpio ran yesterdasy
Si I think either the pic with the GPIO pin from PI3 is wrong or the sensor is dead

So you have the data wire (2nd pin from the left on your sensor) going to GPIO 4 (pin 7)?

In addition as I have asked in both threads please post your config and maintain formatting. It is so important in HA to be able to check the formatting.

  - platform: dht
    sensor: DHT22
    pin: '04'
    monitored_conditions:
      - temperature
      - humidity

Have you tried changing the 04 to ‘04’ ?

Tried both. Not really changing.

So the error seems to be consistent
sudo ./AdafruitDHT.py 22 4
Failed to get reading. Try again!
Another Sensor -> Same result.
I will walk to another PI and see if this is still the problem there.

So on the Commandline with PIN22 I got results from the 3rd DHT22
Let’s see how Home Assistant will look like

nope
No result reported in the GUI.
How ofter is Home Assistant doing a read on the sensor?
Can I trigger that to do it every minute?

I do see

]: 16-11-16 19:38:58 INFO (MainThread) [homeassistant.loader] Loaded sensor.dht from homeassistant.components.sensor.dht

Today in the morning the logfile stats:
16-11-17 07:45:30 homeassistant.components.sensor.dht: DHT sensor type is not supported

the config looks like

Weather Prediction

sensor:

  • platform: yr
  • platform: dht
    sensor: dht22
    pin: ‘22’
    monitored_conditions:
    • temperature
    • humidity

I get ride of the tabs

sensor:

  • platform: yr
  • platform: dht
    sensor: dht22
    pin: ‘22’
    monitored_conditions:
    • temperature
    • humidity

Folks,
I tried a

  • platform: DHT
    sensor: dht22
    pin: ‘22’
    monitored_conditions:
    • temperature
    • humidity

-> 16-11-17 11:04:44 homeassistant.components.sensor.dht: DHT sensor type is not supported

  • platform: dht
    sensor: dht22
    pin: ‘22’
    monitored_conditions:
    • temperature
    • humidity
      -> 16-11-17 11:04:44 homeassistant.components.sensor.dht: dht sensor type is not supported

Do you have a pull up resister between the 3.3 V line and the data line ?

I mean I can get a result when I use
sudo ./AdafruitDHT.py 22 22
Temp=25.1* Humidity=61.4%
so it should be configured in the right manner?

Do not get it why

  • platform: DHT
    sensor: dht22
    pin: ‘22’
    monitored_conditions:
    • temperature
    • humidity

does not work???

Removed the resistor with a new one and a new sensor and things are working. I will also try with upper case DHC to see if this changes the behavior.

THANKS for your help