wait_for_state_change#

Node.wait_for_state_change(value: Union[int, str, NodeEnum], *, invert: bool = False, timeout: float = 2.0, sleep_time: float = 0.005) None[source]#

Waits until the node has the expected state/value.

Warning

Only supports integer nodes. (The value can either be the value or its corresponding enum value as string)

Parameters:
  • value (Union[int, str, NodeEnum]) – Expected value of the node.

  • versionchanged: (..) – 0.6.1 Enums or strings are accepted for keywords nodes.:

  • invert (bool) –

    Instead of waiting for the value, the function will wait for any value except the passed value instead. (default = False)

    Useful when waiting for value to change from existing one.

  • timeout (float) – Maximum wait time in seconds. (default = 2)

  • versionchanged: – 0.6.4 A zero seconds timeout is accepted.:

  • sleep_time (float) – Sleep interval in seconds. (default = 0.005)

Raises:

TimeoutError – Timeout exceeded.

Return type:

None