|
| 1 | +--- |
| 2 | +title: custom_card_device_tracker |
| 3 | +hide: |
| 4 | + - toc |
| 5 | +--- |
| 6 | +<!-- markdownlint-disable MD046 --> |
| 7 | + |
| 8 | +## Description |
| 9 | + |
| 10 | +{ width="500" } |
| 11 | + |
| 12 | +The `custom_card_device_tracker` displays presence state of a device according to the provided entity. |
| 13 | +It allow to display the state of two tracker for this device |
| 14 | + |
| 15 | +## Variables |
| 16 | + |
| 17 | +| Variable | Default | Required | Notes | |
| 18 | +|----------|---------|------------------|-------------------| |
| 19 | +| entity | | :material-check: | The device entity or group | |
| 20 | +| ulm_custom_card_device_tracker_icon | | :material-close: | `icon` to display | |
| 21 | +| ulm_custom_card_device_tracker_tracker_1_entity | | :material-close: | Set the first tracker `entity`. | |
| 22 | +| ulm_custom_card_device_tracker_tracker_1_type | | :material-close: | Set the type of the first tracker, for the notification icon | |
| 23 | +| ulm_custom_card_device_tracker_tracker_2_entity | | :material-close: | Set the second tracker `entity`. | |
| 24 | +| ulm_custom_card_device_tracker_tracker_2_type | | :material-close: | Set the type of the second tracker, for the notification icon | |
| 25 | + |
| 26 | +## Usage |
| 27 | + |
| 28 | +```yaml |
| 29 | +- type: 'custom:button-card' |
| 30 | + template: custom_card_device_tracker |
| 31 | + entity: group.my_smartphone |
| 32 | + variables: |
| 33 | + ulm_custom_card_device_tracker_icon: mdi:cellphone |
| 34 | + ulm_custom_card_device_tracker_tracker_1_entity: device_tracker.my_smartphone_ping |
| 35 | + ulm_custom_card_device_tracker_tracker_1_type: 'lan' |
| 36 | + ulm_custom_card_device_tracker_tracker_2_entity: device_tracker.my_smartphone_bluetooth |
| 37 | + ulm_custom_card_device_tracker_tracker_2_type: 'bluetooth' |
| 38 | +``` |
| 39 | +
|
| 40 | +??? note "Template Code" |
| 41 | +
|
| 42 | + ```yaml title="custom_card_device_tracker.yaml" |
| 43 | + --8<-- "custom_cards/custom_card_device_tracker/custom_card_device_tracker.yaml" |
| 44 | + ``` |
0 commit comments