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 ----------------