mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 23:36:51 +00:00
some tweaks for Subview (#24976)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
5070d3469d
commit
c98a59f8cf
@ -127,9 +127,9 @@ frontend:
|
||||
|
||||
## Subview
|
||||
|
||||
View can be marked as "Subview". Subviews won’t show up in the navigation bar on top of the sidebar. Subviews can, for instance, be used to show detailed information; you could link to this subview from a page with a clean look with only basic information (by using [cards that support the `navigate` action](/dashboards/actions)). Think of a view with a few thermostats and a subview with status information on the heating/cooling device.
|
||||
A "View" can be marked as "Subview". Subviews won’t show up in the navigation bar on top of the sidebar. Subviews can, for instance, be used to show detailed information; you could link to this subview from a page with a clean look with only basic information (by using [cards that support the `navigate` action](/dashboards/actions)). Think of a view with a few thermostats and a subview with status information on the heating/cooling device.
|
||||
|
||||
When on the subview, the navigation bar only show the name of the subview and a back button.
|
||||
When on the subview, the navigation bar only shows the name of the subview and a back button (no icon is shown).
|
||||
By default, clicking on back button will navigate to the previous view but a custom back path (`back_path`) can be set.
|
||||
|
||||
You can access subviews from other parts of your dashboard by using [cards that support the `navigate` action](/dashboards/actions).
|
||||
@ -176,20 +176,20 @@ views:
|
||||
type: list
|
||||
path:
|
||||
required: false
|
||||
description: Paths are used in the URL, more info below.
|
||||
description: Paths are used in the URL.
|
||||
type: string
|
||||
default: view index
|
||||
icon:
|
||||
required: false
|
||||
description: Icon-name from Material Design Icons. You can use any icon from [MaterialDesignIcons.com](https://materialdesignicons.com). Prefix the icon name with `mdi:`, ie `mdi:home`.
|
||||
description: Icon-name from Material Design Icons. You can use any icon from [MaterialDesignIcons.com](https://materialdesignicons.com). Prefix the icon name with `mdi:`, ie `mdi:home`. Only for "View", not for "Subview".
|
||||
type: string
|
||||
background:
|
||||
required: false
|
||||
description: Style the background using CSS, more info below.
|
||||
description: Style the background using CSS.
|
||||
type: string
|
||||
theme:
|
||||
required: false
|
||||
description: Themes view and cards, more info below.
|
||||
description: Themes view and cards.
|
||||
type: string
|
||||
visible:
|
||||
required: false
|
||||
@ -198,12 +198,12 @@ views:
|
||||
default: true
|
||||
subview:
|
||||
required: false
|
||||
description: Mark the view as "Subview", more info below.
|
||||
description: Mark the view as "Subview".
|
||||
type: boolean
|
||||
default: false
|
||||
back_path:
|
||||
required: false
|
||||
description: Only for subview. Path to navigate when clicking on back button, more info below.
|
||||
description: Only for subview. Path to navigate when clicking on back button.
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
@ -221,3 +221,17 @@ View configuration:
|
||||
- entity: switch.decorative_lights
|
||||
image: /local/lights.png
|
||||
```
|
||||
|
||||
Subview configuration:
|
||||
|
||||
```yaml
|
||||
title: "Energieprijzen"
|
||||
path: "energieprijzen"
|
||||
subview: true
|
||||
back_path: "/ui-data/climate"
|
||||
|
||||
cards:
|
||||
- type: entities
|
||||
entities:
|
||||
- sensor.today_avg_price
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user