It’s not officially supported currently. Some community members have come up with creative workarounds, but it’s generally an anti-pattern if there’s some way to get the data in an event driven way.
For example, if you have a device that has data you are interested in, it’s generally better to create a rule that has a Trigger for your device’s particular attribute updating/changing and then react to that within your flow (for example, copying the data over to a variable if that’s your use case).
If you are building a SharpTools Custom Tile, then the stio
Library can directly access data from a device attribute and use or display that data within the Custom Tile directly.
When editing your Custom Tile, you would need to setup a Thing
setting in the Custom Tile which would let you pick your desired ‘Thing’ from a dropdown when configuring your actual tile instance on your dashboard. Then in your Custom Tile code, you would use the stio
Library to reference your ‘Thing’ setting and subscribe()
to your desired attribute if you need realtime data and then access the current attribute value or real time attribute update event values as needed.
The “Access to Things and Variables” release thread included some example custom tiles for reference: