DHT Sensor - custom_components

Maybe changing the pins?

perfect! working again…

after add the code, the config check wont pass… I had reboot manually… but after that it works fine.

I managed to make the sensor work with fer4droid’s tips, but my log is full of errors.

Any idea?

2022-12-04 00:35:28.623 WARNING (SyncWorker_4) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.352(s), this was the 1st time calling it.
2022-12-04 00:35:28.979 WARNING (SyncWorker_1) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.352(s), this was the 1st time calling it.
2022-12-04 00:35:58.625 WARNING (SyncWorker_3) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.352(s), this was the 1st time calling it.
2022-12-04 00:35:58.981 WARNING (SyncWorker_8) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.351(s), this was the 1st time calling it.
2022-12-04 00:36:28.979 WARNING (SyncWorker_3) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.352(s), this was the 1st time calling it.
2022-12-04 00:36:58.981 WARNING (SyncWorker_3) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.352(s), this was the 1st time calling it.
2022-12-04 00:37:28.628 WARNING (SyncWorker_5) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.352(s), this was the 1st time calling it.
2022-12-04 00:37:28.984 WARNING (SyncWorker_0) [custom_components.dht.sensor] Finished call to 'custom_components.dht.sensor.DHTClient.read_retry' after 0.352(s), this was the 1st time calling it.

Well, I thought my DHT is working, but it isn’t. I think it is because of the library installed.
I installed a deprecated library (AdaFruit_Python_DHT) … when I check the temp and hum, it returns data correctly:
image
Looking at the manifest.json, its reference is “AdaFruit_CircuitPython_DHT”:

ok… I installed this one too… but I cannot see the temp and hum (maybe im using a wrong command?)
nothing happens…
image
Also, checking the example py… it says to check the wires… but as tested before…the wires are ok…
image

Whar am I doing wrong? if I cannot check the temperature and humidity using the terminal, I will never be able to check using home assistant :frowning: ]

thank you!

Yeah, 2 line of log every 30 seconds is very annoying…
I “work around” the problem by editing the file sensor.py and changing the line 183 deleting the last parameter, so the line now look like this:
@retry(reraise = True, retry = retry_if_exception_type(RuntimeError), stop = stop_after_attempt(15))

For those of you who’s sensor doesn’t work.
Remember that non only DHT is deprecated but also the GPIO.
So try to install also the unofficial GPIO support on HACS:

My work around was to raise the custom_components.dht.sensor log to error instead of warning

So the workaround makes the custom component to work?
Thanks