# Can DTH's read or subscribe to Attributes?

**URL:** <https://community.smartthings.com/t/can-dths-read-or-subscribe-to-attributes/218145>\
**Category:** Writing Device Types\
**Created:** [January 18, 2021, 11:05pm UTC](https://community.smartthings.com/t/can-dths-read-or-subscribe-to-attributes/218145 "2021-01-18T23:05:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jemenake](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jemenake](https://community.smartthings.com/u/jemenake)\
**Post date:** [January 18, 2021, 11:05pm UTC](https://community.smartthings.com/t/can-dths-read-or-subscribe-to-attributes/218145/1 "2021-01-18T23:05:21Z")

</div>

Because I can’t stop asking questions about the platform that’s about to be obsolete (but mainly because it helps to understand how ST thinks about how all of this stuff is supposed to work, which may carry forward to the new platform)…

I’m building a little cheat-sheet on the different ways and scenarios to use preferences, attributes, and state/atomicstate.  
[https://docs.google.com/spreadsheets/d/1rgua4tqpprSR71OdknwBSZaRTrIskyv0izKDsoIqWkgs](https://docs.google.com/spreadsheets/d/1rgua4tqpprSR71OdknwBSZaRTrIskyv0izKDsoIqWkgs)

I’ve figured out how to read/write preference and state items, but I’ve only been able to _set_ attributes (with createEvent/sendEvent). The old developer docs talk about being able to read them and even _subscribe_ to state changes, but all of the examples are for SmartApps and I haven’t gotten any of the examples to work in a DTH. **Is there a way to read an attribute value in a DTH?**

---

<div class="post-metadata">

**Author:** ![orangebucket](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/orangebucket/32/81590_2.png) [@orangebucket](https://community.smartthings.com/u/orangebucket)\
**Post date:** [January 18, 2021, 11:17pm UTC](https://community.smartthings.com/t/can-dths-read-or-subscribe-to-attributes/218145/2 "2021-01-18T23:17:11Z")

</div>

Yes, it is briefly mentioned on

> **[Overview — SmartThings Classic Developer Documentation](https://docs.smartthings.com/en/latest/device-type-developers-guide/overview.html)**

See also `device` on

> **[Overview — SmartThings Classic Developer Documentation](https://docs.smartthings.com/en/latest/device-type-developers-guide/overview.html)**

for alternative forms.

You may notice that there is conflict between _attribute_ and _state_ terminology in the API and docs so _attributes_ are called _states_ and a _state_ refers to two different concepts. Incredibly the problem of using _state_ to mean _attribute_ still exists in the current API.
