Skip to content

Commit 4f790e9

Browse files
committed
minor fix
1 parent 467f271 commit 4f790e9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/reference.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,10 @@ If the trigger was caused by ``@state_trigger``, the prior value of the state va
422422
caused the trigger is available to ``str_expr`` with a ``.old`` suffix.
423423

424424
Inside the ``str_expr``, undefined state variables, undefined state attributes, and undefined
425-
``.old`` variables evaluate to `None`, rather than throwing an exception. Any ``.old`` variable
426-
will be ``None`` if the trigger is not a state trigger or if a different state variable change
427-
cause the state trigger.
425+
``.old`` variables evaluate to ``None``, rather than throwing an exception. Any ``.old`` variable
426+
will be ``None`` if the trigger is not a state trigger, if a different state variable change
427+
caused the state trigger, or if the state variable that caused the trigger was set for the
428+
first time (so there is no prior value).
428429

429430
@time_active
430431
^^^^^^^^^^^^

0 commit comments

Comments
 (0)