# DHT22 getting started device.sendState problem

**URL:** <https://forums.losant.com/t/dht22-getting-started-device-sendstate-problem/3570>\
**Category:** Help\
**Tags:** mqtt\
**Created:** [February 4, 2021, 4:23pm UTC](https://forums.losant.com/t/dht22-getting-started-device-sendstate-problem/3570 "2021-02-04T16:23:48Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [February 5, 2021, 5:44pm UTC](https://forums.losant.com/t/dht22-getting-started-device-sendstate-problem/3570/33 "2021-02-05T17:44:20Z")

</div>

@Matthias_Kamps,

Just so you know, I was able to get to that point with [this documentation](https://arduinojson.org/v6/api/jsondocument/#using-a-jsondocument) from ArduinoJson.

The important part to note here is:

> JsonDocument::to() clears the document and converts it to the specified type. Don’t confuse this function with JsonDocument::as() that returns a reference only if the requested type matches the one in the document.

Happy that we were able to get you sorted out!

Enjoy,  
Heath

[Previous page](https://forums.losant.com/t/dht22-getting-started-device-sendstate-problem/3570.md?page=1)
