Update gallery demos (#2206)

* Update gallery demos

* Update demo-hui-glance-card.ts
This commit is contained in:
Ian Richardson 2018-12-07 00:04:02 -06:00 committed by Paulus Schoutsen
parent 0fd3c03764
commit 3d67d9eba3
3 changed files with 26 additions and 4 deletions

View File

@ -172,10 +172,14 @@ const CONFIGS = [
- type: glance
entities:
- entity: lock.kitchen_door
tap_action: toggle
tap_action:
type: toggle
- entity: light.ceiling_lights
tap_action: call-service
service: light.turn_on
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

View File

@ -56,7 +56,8 @@ const CONFIGS = [
--iron-icon-fill-color: rgba(50, 50, 50, .75)
- type: image
entity: light.bed_light
tap_action: toggle
tap_action:
action: toggle
image: /images/light_bulb_off.png
state_image:
'on': /images/light_bulb_on.png

View File

@ -83,6 +83,23 @@ const CONFIGS = [
- binary_sensor.basement_floor_wet
`,
},
{
heading: "Custom tap action",
config: `
- type: picture-glance
image: /images/living_room.png
title: Living room
entity: light.ceiling_lights
tap_action:
action: toggle
entities:
- entity: switch.decorative_lights
icon: mdi:power
tap_action:
action: toggle
- binary_sensor.basement_floor_wet
`,
},
];
class DemoPicGlance extends PolymerElement {