get device state

This block is part of the globals group and was last modified in core v15.0.0.

get device state v15.0.0

Reads one capability from one device : is the motion sensor triggered, what is the temperature.

In pins 2 + flow
  • flow v15.0.0
    flow
  • device v15.0.0
    value

    Device id, native address, or exact device name. Leave empty to use the device picked on the block.

  • capability required v15.0.0
    value

    Suggestions: occupancy contact power brightness temperature humidity battery illuminance

Out pins 5 + flow
  • flow v15.0.0
    flow
  • state known v15.0.0
    condition

    False when this device has not reported this capability yet. Do not read `value` when this is false.

  • value v15.0.0
    value
  • boolean v15.0.0
    condition

    The value coerced to true/false, for branching.

  • number v15.0.0
    number

    The value coerced to a number.

  • device v15.0.0
    object

Returns the last reported value of one capability. `state_known` is false when the node has not heard that capability from that device since it started; in that case `value` is empty and MUST NOT be read as false or zero. This distinction is why the pin exists.

zigbee
zwave
matter
thread
hue
smart home

A typical wiring for get device state: a function trigger starts the flow; the flow out pin feeds debug.

Studio canvas example for the get device state block: typical wiring for get device state.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v15.0.0.


Back to globals Return to the main group to view all sub-groups Back to home Return to the group to view all blocks within this group