Skip to content

Commit 260a47d

Browse files
authored
Update globals.rst (#5193)
1 parent 2fcc0dc commit 260a47d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/globals.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Global Variables
22
----------------
33

4-
In some cases you might need to share a global variable across multiple lambdas. For example, global variables can be
4+
In some cases you might need to share a global variable across multiple lambdas, or to remember between periods of deep_sleep. For example, global variables can be
55
used to store the state of a garage door.
66

77
.. code-block:: yaml
@@ -46,6 +46,8 @@ Configuration variables:
4646
can not be restored or if state restoration is not enabled. This needs to be wrapped in quotes! Defaults to
4747
the C++ default value for this type (for example ``0`` for integers).
4848

49+
Within lambdas globals don’t have a state attribute, just a value. Note in the example above the use of id(my_global_int) where other components would require id(my_component).state.
50+
4951
.. _globals-set_action:
5052

5153
``globals.set`` Action

0 commit comments

Comments
 (0)