mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
New options for map card markers (#29017)
This commit is contained in:
parent
d3ef019217
commit
07a03b7bc7
@ -27,7 +27,7 @@ type:
|
|||||||
type: string
|
type: string
|
||||||
entities:
|
entities:
|
||||||
required: true
|
required: true
|
||||||
description: List of entity IDs. Either this or the `geo_location_sources` configuration option is required.
|
description: List of entity IDs or `entity` objects (see below). Either this or the `geo_location_sources` configuration option is required.
|
||||||
type: list
|
type: list
|
||||||
geo_location_sources:
|
geo_location_sources:
|
||||||
required: true
|
required: true
|
||||||
@ -75,6 +75,31 @@ hours_to_show:
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
## Options For Entities
|
||||||
|
|
||||||
|
If you define entities as objects instead of strings (by adding `entity:` before entity ID), you can add more customization and configuration.
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
entity:
|
||||||
|
required: true
|
||||||
|
description: Entity ID.
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: Replace the default label for the marker.
|
||||||
|
type: string
|
||||||
|
label_mode:
|
||||||
|
required: false
|
||||||
|
default: name
|
||||||
|
description: When set to `state`, renders the entity's state as the label for the map marker instead of the entity's name.
|
||||||
|
type: string
|
||||||
|
focus:
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
description: When set to `false`, this entity will not be considered for determining the default zoom or fit of the map.
|
||||||
|
type: boolean
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -99,5 +124,8 @@ entities:
|
|||||||
type: map
|
type: map
|
||||||
entities:
|
entities:
|
||||||
- device_tracker.demo_paulus
|
- device_tracker.demo_paulus
|
||||||
|
- entity: sensor.gas_station_gas_price
|
||||||
|
label_mode: state
|
||||||
|
focus: false
|
||||||
hours_to_show: 48
|
hours_to_show: 48
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user