I have DHT11:
I made the following change to the module for DHT11 ( I don't have DHT22):
--h = 10 * b[1]
--t = 10 * b[3]
h = b[1]
t = b[3]
..it will return integer values for t and h.
This should be included in the usage example:
t, h = require("yet-another-dht22").read(4)
-- unload module
yet-another-dht22 = nil
package.loaded["yet-another-dht22"] = nil
-- t and h remain available to your program, call above to update variables and release
print(t)
print(h)
-Cheers!