mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-30 04:36:36 +00:00
Make entity-filter and glances demo a bit clearer & cleaner (#8157)
This commit is contained in:
parent
6919d0cde6
commit
1aab656705
@ -48,7 +48,7 @@ const ENTITIES = [
|
|||||||
|
|
||||||
const CONFIGS = [
|
const CONFIGS = [
|
||||||
{
|
{
|
||||||
heading: "Controller",
|
heading: "Unfiltered controller",
|
||||||
config: `
|
config: `
|
||||||
- type: entities
|
- type: entities
|
||||||
entities:
|
entities:
|
||||||
@ -58,7 +58,7 @@ const CONFIGS = [
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "Basic",
|
heading: "Filtered entities card",
|
||||||
config: `
|
config: `
|
||||||
- type: entity-filter
|
- type: entity-filter
|
||||||
entities:
|
entities:
|
||||||
@ -74,7 +74,27 @@ const CONFIGS = [
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "With card config",
|
heading: 'With "entities" card config',
|
||||||
|
config: `
|
||||||
|
- type: entity-filter
|
||||||
|
entities:
|
||||||
|
- device_tracker.demo_anne_therese
|
||||||
|
- device_tracker.demo_home_boy
|
||||||
|
- device_tracker.demo_paulus
|
||||||
|
- light.bed_light
|
||||||
|
- light.ceiling_lights
|
||||||
|
- light.kitchen_lights
|
||||||
|
state_filter:
|
||||||
|
- "on"
|
||||||
|
- not_home
|
||||||
|
card:
|
||||||
|
type: entities
|
||||||
|
title: Custom Title
|
||||||
|
show_header_toggle: false
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
heading: 'With "glance" card config',
|
||||||
config: `
|
config: `
|
||||||
- type: entity-filter
|
- type: entity-filter
|
||||||
entities:
|
entities:
|
||||||
@ -89,7 +109,8 @@ const CONFIGS = [
|
|||||||
- not_home
|
- not_home
|
||||||
card:
|
card:
|
||||||
type: glance
|
type: glance
|
||||||
show_state: false
|
show_state: true
|
||||||
|
title: Custom Title
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -82,7 +82,8 @@ const CONFIGS = [
|
|||||||
heading: "With title",
|
heading: "With title",
|
||||||
config: `
|
config: `
|
||||||
- type: glance
|
- type: glance
|
||||||
title: This is glance
|
title: Custom title
|
||||||
|
columns: 4
|
||||||
entities:
|
entities:
|
||||||
- device_tracker.demo_paulus
|
- device_tracker.demo_paulus
|
||||||
- media_player.living_room
|
- media_player.living_room
|
||||||
@ -109,9 +110,10 @@ const CONFIGS = [
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "No name",
|
heading: "No entity names",
|
||||||
config: `
|
config: `
|
||||||
- type: glance
|
- type: glance
|
||||||
|
columns: 4
|
||||||
show_name: false
|
show_name: false
|
||||||
entities:
|
entities:
|
||||||
- device_tracker.demo_paulus
|
- device_tracker.demo_paulus
|
||||||
@ -124,9 +126,10 @@ const CONFIGS = [
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "No state",
|
heading: "No state labels",
|
||||||
config: `
|
config: `
|
||||||
- type: glance
|
- type: glance
|
||||||
|
columns: 4
|
||||||
show_state: false
|
show_state: false
|
||||||
entities:
|
entities:
|
||||||
- device_tracker.demo_paulus
|
- device_tracker.demo_paulus
|
||||||
@ -139,9 +142,10 @@ const CONFIGS = [
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "No name and no state",
|
heading: "No names and no state labels",
|
||||||
config: `
|
config: `
|
||||||
- type: glance
|
- type: glance
|
||||||
|
columns: 4
|
||||||
show_name: false
|
show_name: false
|
||||||
show_state: false
|
show_state: false
|
||||||
entities:
|
entities:
|
||||||
@ -155,47 +159,24 @@ const CONFIGS = [
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "Custom name, custom icon",
|
heading: "Custom name + custom icon",
|
||||||
config: `
|
config: `
|
||||||
- type: glance
|
- type: glance
|
||||||
|
columns: 4
|
||||||
entities:
|
entities:
|
||||||
- entity: device_tracker.demo_paulus
|
- entity: device_tracker.demo_paulus
|
||||||
name: ¯\\_(ツ)_/¯
|
name: ¯\\_(ツ)_/¯
|
||||||
icon: mdi:home-assistant
|
icon: mdi:home-assistant
|
||||||
- media_player.living_room
|
- entity: media_player.living_room
|
||||||
- sun.sun
|
name: ¯\\_(ツ)_/¯
|
||||||
- cover.kitchen_window
|
icon: mdi:home-assistant
|
||||||
- entity: light.kitchen_lights
|
|
||||||
icon: mdi:alarm-light
|
|
||||||
- lock.kitchen_door
|
|
||||||
- light.ceiling_lights
|
|
||||||
`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
heading: "Custom tap action",
|
|
||||||
config: `
|
|
||||||
- type: glance
|
|
||||||
entities:
|
|
||||||
- entity: lock.kitchen_door
|
|
||||||
tap_action:
|
|
||||||
type: toggle
|
|
||||||
- entity: light.ceiling_lights
|
|
||||||
tap_action:
|
|
||||||
action: call-service
|
|
||||||
service: light.turn_on
|
|
||||||
service_data:
|
|
||||||
entity_id: light.ceiling_lights
|
|
||||||
- device_tracker.demo_paulus
|
|
||||||
- media_player.living_room
|
|
||||||
- sun.sun
|
|
||||||
- cover.kitchen_window
|
|
||||||
- light.kitchen_lights
|
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "Selectively hidden name",
|
heading: "Selectively hidden name",
|
||||||
config: `
|
config: `
|
||||||
- type: glance
|
- type: glance
|
||||||
|
columns: 4
|
||||||
entities:
|
entities:
|
||||||
- device_tracker.demo_paulus
|
- device_tracker.demo_paulus
|
||||||
- entity: media_player.living_room
|
- entity: media_player.living_room
|
||||||
@ -204,21 +185,32 @@ const CONFIGS = [
|
|||||||
- entity: cover.kitchen_window
|
- entity: cover.kitchen_window
|
||||||
name:
|
name:
|
||||||
- light.kitchen_lights
|
- light.kitchen_lights
|
||||||
|
- entity: lock.kitchen_door
|
||||||
|
name:
|
||||||
|
- light.ceiling_lights
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "Primary theme",
|
heading: "Custom tap action",
|
||||||
config: `
|
config: `
|
||||||
- type: glance
|
- type: glance
|
||||||
theming: primary
|
columns: 4
|
||||||
entities:
|
entities:
|
||||||
- device_tracker.demo_paulus
|
- entity: lock.kitchen_door
|
||||||
- media_player.living_room
|
name: Custom
|
||||||
- sun.sun
|
tap_action:
|
||||||
- cover.kitchen_window
|
type: toggle
|
||||||
- light.kitchen_lights
|
- entity: light.ceiling_lights
|
||||||
- lock.kitchen_door
|
name: Custom
|
||||||
- light.ceiling_lights
|
tap_action:
|
||||||
|
action: call-service
|
||||||
|
service: light.turn_on
|
||||||
|
service_data:
|
||||||
|
entity_id: light.ceiling_lights
|
||||||
|
- entity: sun.sun
|
||||||
|
name: Regular
|
||||||
|
- entity: light.kitchen_lights
|
||||||
|
name: Regular
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user