From 97f20ae9f6973ac2ad5609c59c99d69c0a1ac6b5 Mon Sep 17 00:00:00 2001 From: c727 <11984118+c727@users.noreply.github.com> Date: Thu, 26 Jul 2018 23:05:48 +0200 Subject: [PATCH] Lovelace: Add Conditional Card --- source/_lovelace/conditional.markdown | 62 +++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 source/_lovelace/conditional.markdown diff --git a/source/_lovelace/conditional.markdown b/source/_lovelace/conditional.markdown new file mode 100644 index 00000000000..4bf17345887 --- /dev/null +++ b/source/_lovelace/conditional.markdown @@ -0,0 +1,62 @@ +--- +layout: page +title: Conditional Card +sidebar_label: Conditional +description: Displays another card based on entity states. +date: 2018-07-26 10:28 +00:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +Displays another card based on entity states. + +{% configuration %} +type: + required: true + description: conditional + type: string +conditions: + required: true + description: List of entity IDs and matching states. + type: list + keys: + entity: + required: true + description: HA entity ID. + type: string + state: + required: false + description: Entity state is equal to this value.* + type: string + state_not: + required: false + description: Entity state is unequal to this value.* + type: string +card: + required: true + description: Card to display if all conditions match. + type: object +{% endconfiguration %} + +*one is required (`state` or `state_not`) + +### {% linkable_title Examples %} + +```yaml +- type: conditional + conditions: + - entity: light.bed_light + state: "on" + - entity: switch.decorative_lights + state_not: "off" + card: + type: entities + entities: + - device_tracker.demo_paulus + - cover.kitchen_window + - group.kitchen + - lock.kitchen_door + - light.bed_light +```