docs: Add special case warning for fullscreen condition (#2373)

This commit is contained in:
Dermot Duffy
2026-02-23 18:59:41 -08:00
committed by GitHub
parent d5e1e02328
commit 753cf02d90
5 changed files with 68 additions and 17 deletions
+55
View File
@@ -43,6 +43,12 @@ This example will automatically turn on the first configured substream when the
card is put in fullscreen mode, and turn off the substream when exiting
fullscreen mode.
> [!WARNING]
> When fullscreen is entered via a video player's built-in controls (rather than
> the card's fullscreen menu button), automation actions that replace _that_ video
> element (e.g. switching substreams from one video to another) will immediately exit fullscreen (as the browser sees the video the user clicked on be destroyed). See the
> [fullscreen condition](configuration/conditions.md?id=fullscreen) for details.
```yaml
type: custom:advanced-camera-card
cameras:
@@ -77,6 +83,55 @@ automations:
advanced_camera_card_action: live_substream_off
```
### Fullscreen with display mode and substream switching
This example adds a custom menu button that switches to single display mode,
activates the HD substream, and enters card fullscreen — all in a single tap.
An automation restores the grid layout and substream when fullscreen is exited.
This is useful in [grid](configuration/live.md) layouts where the card's
standard fullscreen button would show all cameras rather than a single HD
stream.
```yaml
type: custom:advanced-camera-card
cameras:
- camera_entity: camera.office
dependencies:
cameras:
- office_hd
- camera_entity: camera.office_hd
title: Office HD
id: office_hd
capabilities:
disable_except:
- substream
live:
display:
mode: grid
elements:
- type: custom:advanced-camera-card-menu-icon
icon: mdi:fullscreen
title: Fullscreen HD
tap_action:
- action: custom:advanced-camera-card-action
advanced_camera_card_action: display_mode_select
display_mode: single
- action: custom:advanced-camera-card-action
advanced_camera_card_action: live_substream_on
- action: custom:advanced-camera-card-action
advanced_camera_card_action: fullscreen
automations:
- conditions:
- condition: fullscreen
fullscreen: false
actions:
- action: custom:advanced-camera-card-action
advanced_camera_card_action: live_substream_off
- action: custom:advanced-camera-card-action
advanced_camera_card_action: display_mode_select
display_mode: grid
```
### Responding to key input
In addition to a handful of reconfigurable [built-in keyboard shortcuts](./usage/keyboard-shortcuts.md), `automations` can be used to take any action based on any keyboard input. These examples use [`key` conditions](./configuration/conditions.md?id=key) to assess keyboard state before taking action.