From acf110f84d6b15bf50e5a948f5893eb9d34ecd6a Mon Sep 17 00:00:00 2001 From: Stanislav Meduna Date: Sat, 3 Apr 2021 04:00:51 +0200 Subject: [PATCH] add documentation for display.is_displaying_page (#1079) --- components/display/index.rst | 21 +++++++++++++++++++++ guides/automations.rst | 1 + 2 files changed, 22 insertions(+) diff --git a/components/display/index.rst b/components/display/index.rst index be60356ba..dcb33236f 100644 --- a/components/display/index.rst +++ b/components/display/index.rst @@ -540,6 +540,27 @@ You can then switch between these with three different actions: - display.page.show_next: my_display - component.update: my_display +.. _display-is_displaying_page-condition: + +**display.is_displaying_page**: This condition returns true while the specified page is being shown. + +.. code-block:: yaml + + # In some trigger: + on_...: + - if: + condition: + display.is_displaying_page: page1 + then: + ... + - if: + condition: + display.is_displaying_page: + id: my_display + page_id: page2 + then: + ... + See Also -------- diff --git a/guides/automations.rst b/guides/automations.rst index ac6159624..93c417368 100644 --- a/guides/automations.rst +++ b/guides/automations.rst @@ -394,6 +394,7 @@ All Conditions - :ref:`sun.is_above_horizon / sun.is_below_horizon ` - :ref:`text_sensor.state ` - :ref:`light.is_on ` / :ref:`light.is_off ` +- :ref:`display.is_displaying_page ` All Lambda Calls ----------------