From 5f1efdeeb6961a665dbb26785b3d1ebdbfbd8eb6 Mon Sep 17 00:00:00 2001 From: MagieMalone Date: Mon, 25 Jan 2021 12:34:36 +0100 Subject: [PATCH] easier return entity state object of a trigger (#16294) replacing `states[trigger.to_state.domain][trigger.to_state.object_id]` with `states[trigger.to_state.entity_id]` for better readability and keeping the same function. --- source/_docs/automation/templating.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_docs/automation/templating.markdown b/source/_docs/automation/templating.markdown index fbbec6af4e7..71e30eed82d 100644 --- a/source/_docs/automation/templating.markdown +++ b/source/_docs/automation/templating.markdown @@ -67,7 +67,7 @@ Knowing how to access the [state object](/docs/configuration/state_object/) of a * `trigger.from_state` will return the **previous** [state object](/docs/configuration/state_object/) of the entity. * `trigger.to_state` will return the **new** [state object](/docs/configuration/state_object/) that triggered trigger. -* `states[trigger.to_state.domain][trigger.to_state.object_id]` will return the **current** [state object](/docs/configuration/state_object/) of the entity. +* `states[trigger.to_state.entity_id]` will return the **current** [state object](/docs/configuration/state_object/) of the entity.