mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-19 22:24:15 +01:00
2.2 KiB
2.2 KiB
Entities
Entities are mainly used on cardEntities, cardGrid and cardGrid.
It is possible to overwrite and configure varrious things on Entities.
Possible configuration values for entities key:
| key | optional | type | default | description |
|---|---|---|---|---|
entity |
False | string | None |
name of ha entity |
name |
True | string | None |
Used to override names |
icon |
True | string | None |
Used to override icons |
color |
True | array | None |
Overwrite color of entity color: [255, 0, 0] |
state |
True | string | None |
Only displayed if Entity state is equal to this value |
state_not |
True | string | None |
Only displayed if Entity state is unequal to this value |
status |
True | string | None |
Only valid for navigate items, adds a entity to track state for the icon |
assumed_state |
True | string | None |
Only for cover items, up, down and stop buttons are always shown |
Override Icons or Names
To overwrite Icons or Names of entities you can configure an icon and/or name in your configuration, please see the following example. Only the icons listed in the Icon Cheatsheet are useable.
entities:
- entity: light.test_item
name: NameOverride
icon: mdi:lightbulb
It is also possible to configure different icon overwrites per state:
icon:
"on": mdi:lightbulb
"off": mdi:lightbulb
It is also possible to configure different color overwrites per state:
color:
"on": [255,0,0]
"off": [0,0,255]
It is also possible to use text instead of icons with text:X
icon:
"on": mdi:lightbulb
"off": "text:"
Hide item based on state
This sensor will only be shown on the card if it's state is equal to off
- entity: binary_sensor.sensor_bad_contact
state: "off"
This sensor will only be shown on the card if it's state is not equal to on
- entity: binary_sensor.sensor_kueche_contact
state_not: "on"