docs: Add alignment parameter to menu elements documentation (#1681)
This commit is contained in:
@@ -32,17 +32,18 @@ elements:
|
||||
|
||||
Configuration is similar to a stock [Picture Elements Icon](https://www.home-assistant.io/lovelace/picture-elements/#icon-element).
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-icon`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority item are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`, when the menu alignment is `left`). Minimum `0`, maximum `100`. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `title` | | An optional title to display. |
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-icon`. |
|
||||
| `alignment` | `matching` | Whether this menu item should have an alignment that is `matching` the menu alignment or `opposing` the menu alignment. Can be used to create two separate groups of buttons on the menu. The `priority` option orders buttons within a given `alignment`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority items are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`). Priority applies separately to `matching` and `opposing` groups (see `alignment` above). Minimum `0`, maximum `100`. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `title` | | An optional title to display. |
|
||||
|
||||
## `menu-submenu`
|
||||
|
||||
@@ -54,18 +55,19 @@ elements:
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-submenu`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `items` | | A list of menu items, as described below. |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority item are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`, when the menu alignment is `left`). Minimum `0`, maximum `100`. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `title` | | An optional title to display. |
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-submenu`. |
|
||||
| `alignment` | `matching` | Whether this menu item should have an alignment that is `matching` the menu alignment or `opposing` the menu alignment. Can be used to create two separate groups of buttons on the menu. The `priority` option orders buttons within a given `alignment`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `items` | | A list of menu items, as described below. |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority items are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`). Priority applies separately to `matching` and `opposing` groups (see `alignment` above). Minimum `0`, maximum `100`. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `title` | | An optional title to display. |
|
||||
|
||||
### Submenu items
|
||||
|
||||
@@ -90,18 +92,19 @@ elements:
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-submenu-select`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `options` | | An optional dictionary of overrides keyed by the option name that the given select entity supports. These options can be used to set or override submenu item parameters on a per-option basis. The format is as described in [Submenu Items](./README.md?id=submenu-items) above. |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority item are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`, when the menu alignment is `left`). Minimum `0`, maximum `100`. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `title` | | An optional title to display. |
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-submenu-select`. |
|
||||
| `alignment` | `matching` | Whether this menu item should have an alignment that is `matching` the menu alignment or `opposing` the menu alignment. Can be used to create two separate groups of buttons on the menu. The `priority` option orders buttons within a given `alignment`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `options` | | An optional dictionary of overrides keyed by the option name that the given select entity supports. These options can be used to set or override submenu item parameters on a per-option basis. The format is as described in [Submenu Items](./README.md?id=submenu-items) above. |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority items are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`). Priority applies separately to `matching` and `opposing` groups (see `alignment` above). Minimum `0`, maximum `100`. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `title` | | An optional title to display. |
|
||||
|
||||
See the `select` [submenu example](../../../examples.md?id=select-submenu).
|
||||
|
||||
@@ -117,18 +120,19 @@ elements:
|
||||
|
||||
Configuration is similar to a stock [Picture Elements State Icon](https://www.home-assistant.io/lovelace/picture-elements/#state-icon).
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-state-icon`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority item are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`, when the menu alignment is `left`). Minimum `0`, maximum `100`. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `state_color` | `true` | Set to true to have icons colored when entity is active. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `title` | | An optional title to display. |
|
||||
| Parameter | Default | Description |
|
||||
| ------------------------------------------------------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | | Must be `custom:frigate-card-menu-state-icon`. |
|
||||
| `alignment` | `matching` | Whether this menu item should have an alignment that is `matching` the menu alignment or `opposing` the menu alignment. Can be used to create two separate groups of buttons on the menu. The `priority` option orders buttons within a given `alignment`. |
|
||||
| `enabled` | `true` | Whether or not to show this menu item. |
|
||||
| `entity` | | An optional Home Assistant entity for use with actions. |
|
||||
| `icon` | | An required icon to display, e.g. `mdi:car`. See also [custom icons](../../../usage/custom-icons.md). |
|
||||
| `permanent` | `false` | If `false` the menu item is hidden when the menu has the `hidden` style and the menu is closed, otherwise it is shown (and sorted to the front). |
|
||||
| `priority` | `50` | The menu item priority. Higher priority items are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`). Priority applies separately to `matching` and `opposing` groups (see `alignment` above). Minimum `0`, maximum `100`. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](../../actions/README.md) to take when this item is interacted with. |
|
||||
| `state_color` | `true` | Set to true to have icons colored when entity is active. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `title` | | An optional title to display. |
|
||||
|
||||
## `status-bar-icon`
|
||||
|
||||
@@ -202,6 +206,7 @@ elements:
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-menu-icon
|
||||
alignment: matching
|
||||
enabled: true
|
||||
entity: light.office_main_lights
|
||||
icon: mdi:car
|
||||
@@ -211,6 +216,7 @@ elements:
|
||||
color: white
|
||||
title: Vroom
|
||||
- type: custom:frigate-card-menu-state-icon
|
||||
alignment: matching
|
||||
enabled: true
|
||||
entity: light.office_main_lights
|
||||
icon: mdi:chair-rolling
|
||||
@@ -221,6 +227,7 @@ elements:
|
||||
color: white
|
||||
title: Office lights
|
||||
- type: custom:frigate-card-menu-submenu
|
||||
alignment: matching
|
||||
enabled: true
|
||||
entity: light.office_main_lights
|
||||
icon: mdi:menu
|
||||
@@ -250,6 +257,7 @@ elements:
|
||||
color: white
|
||||
title: Office lights
|
||||
- type: custom:frigate-card-menu-submenu-select
|
||||
alignment: matching
|
||||
enabled: true
|
||||
entity: input_select.kitchen_scene
|
||||
icon: mdi:lamps
|
||||
|
||||
Reference in New Issue
Block a user