From 3d67d9eba33cb1bbed7277101721dbb4b490ad5a Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 7 Dec 2018 00:04:02 -0600 Subject: [PATCH] Update gallery demos (#2206) * Update gallery demos * Update demo-hui-glance-card.ts --- gallery/src/demos/demo-hui-glance-card.ts | 10 +++++++--- .../src/demos/demo-hui-picture-elements-card.ts | 3 ++- .../src/demos/demo-hui-picture-glance-card.ts | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/gallery/src/demos/demo-hui-glance-card.ts b/gallery/src/demos/demo-hui-glance-card.ts index 844b7c4656..6df5d2462a 100644 --- a/gallery/src/demos/demo-hui-glance-card.ts +++ b/gallery/src/demos/demo-hui-glance-card.ts @@ -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 diff --git a/gallery/src/demos/demo-hui-picture-elements-card.ts b/gallery/src/demos/demo-hui-picture-elements-card.ts index 53cb27f585..aa991d7706 100644 --- a/gallery/src/demos/demo-hui-picture-elements-card.ts +++ b/gallery/src/demos/demo-hui-picture-elements-card.ts @@ -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 diff --git a/gallery/src/demos/demo-hui-picture-glance-card.ts b/gallery/src/demos/demo-hui-picture-glance-card.ts index 18b5643267..2ab8d7c32c 100644 --- a/gallery/src/demos/demo-hui-picture-glance-card.ts +++ b/gallery/src/demos/demo-hui-picture-glance-card.ts @@ -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 {