From d3d36921b88c948d76a734ddf6d318f24417c915 Mon Sep 17 00:00:00 2001 From: piitaya Date: Wed, 2 Feb 2022 19:24:48 +0100 Subject: [PATCH] add template doc --- docs/cards/sensor.md | 24 ++++++++++++++++++++++++ docs/cards/template.md | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 docs/cards/sensor.md create mode 100644 docs/cards/template.md diff --git a/docs/cards/sensor.md b/docs/cards/sensor.md new file mode 100644 index 000000000..9a3b966e7 --- /dev/null +++ b/docs/cards/sensor.md @@ -0,0 +1,24 @@ +# Sensor card + +![Sensor light](../images/sensor-light.png) +![Sensor dark](../images/sensor-dark.png) + +## Description + +A sensor card allow you to control a sensor entity. + +## Configuration variables + +All the options are available in the lovelace editor but you can use `yaml` if you want. + +| Name | Type | Default | Description | +| :--------------- | :------ | :-------------------------------------------------- | :--------------------------------------- | +| `entity` | string | Required | Sensor entity | +| `icon` | string | Optional | Custom icon | +| `icon_color` | string | `blue` | Custom color for icon | +| `name` | string | Optional | Custom name | +| `vertical` | boolean | `false` | Vertical layout | +| `primary_info` | boolean | `name` `state` | Info to show as primary info | +| `secondary_info` | boolean | `name` `state` `last-changed` `last-updated` `none` | Info to show as secondary info | +| `tap_action` | action | `more-info` | Home assistant action to perform on tap | +| `hold_action` | action | `more-info` | Home assistant action to perform on hold | diff --git a/docs/cards/template.md b/docs/cards/template.md new file mode 100644 index 000000000..349e97757 --- /dev/null +++ b/docs/cards/template.md @@ -0,0 +1,24 @@ +# Template card + +![Template light](../images/template-light.png) +![Template dark](../images/template-dark.png) + +## Description + +A cover card allow you to control a template entity. + +## Configuration variables + +All the options are available in the lovelace editor but you can use `yaml` if you want. + +| Name | Type | Default | Description | +| :------------ | :-------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------- | +| `icon` | string | Optional | Icon to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | +| `icon_color` | string | Optional | Icon color to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | +| `primary` | string | Optional | Primary info to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | +| `secondary` | string | Optional | Secondary info to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | +| `vertical` | boolean | `false` | Vertical layout | +| `hide_state` | boolean | `false` | Hide the entity state | +| `tap_action` | action | `none` | Home assistant action to perform on tap | +| `hold_action` | action | `none` | Home assistant action to perform on hold | +| `entity_id` | `string` `list` | Optional | Only reacts to the state changes of these entities. This can be used if the automatic analysis fails to find all relevant entities. |