Display attribute of an entity in Gauge card (#38831)

This commit is contained in:
Volodymyr Honchar 2025-05-04 23:23:25 -07:00 committed by GitHub
parent acd2d91741
commit 432511b061
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,6 +39,10 @@ entity:
required: true
description: Entity ID to show.
type: string
attribute:
required: false
description: Attribute from the selected entity to display
type: string
name:
required: false
description: Name of gauge entity.
@ -198,3 +202,14 @@ segments:
- from: 65
color: var(--error-color)
```
Display attribute of an entity instead of its state:
```yaml
type: gauge
entity: sensor.back_door_info
attribute: battery_level
unit: '%'
max: 100
```
In this example, the card displays the `battery_level` attribute of the `sensor.back_door_info` entity.