_states_set_

From Yombo
< docs‎ | hooks
Jump to: navigation, search
states_set
Hook name _states_set_
Status Active
Hook source type Library
Stop on exception No
Commonly used Yes
Implemented by states

Summary

Called just after the state value is set.

Details

Called just after the state value is set.

KWargs

  • called_by (ref) - Reference to the atoms library.
  • key (str) - Key that is being set.
  • value (varies) - Value being assigned to key.
  • value_type (str) - Value type that being assigned to key.
  • value_full (dict) - All attributes for the key.
    • value_human (str) - Something presentable to a human.
    • value_type (str) - Type of data contained in the value. Useful for formatting.
    • gateway_id (int) - ID of the gateway that the value was set on.
    • source (int) - String identifier for the object that set the value last.
    • updated_at (int) - Time since Epoch.
    • created_at (int) - Time since Epoch.
    • live (bool) - The state doesn't have a set value, but rather a function is called to get the value - rarely used.
  • gateway_id (str) - ID of the gateway that the value was set on.
  • source (instance) - A reference to the instance that called the set function.
  • source_label (str) - String identifier for the object that set the value last.

Expects

Not expecting any data returned.


This page was last edited on 15 September 2018.