Show multiple entity states or attributes on entity rows in Home Assistant's Lovelace UI
Add multiple-entity-row.js to your <config>/www/
folder. Add the following to your ui-lovelace.yaml
file:
resources:
- url: /local/multiple-entity-row.js?v=1.4.1
type: js
Make sure you have the custom_updater component installed and working.
Add a new reference under
card_urls
in yourcustom_updater
configuration inconfiguration.yaml
.
custom_updater:
card_urls:
- https://raw.usercontent.com/benct/lovelace-multiple-entity-row/master/tracker.json
Name | Type | Default | Description |
---|---|---|---|
type | string | Required | custom:multiple-entity-row |
entity | string | Required | domain.my_entity_id |
name | string | Override entity friendly_name | |
unit | string | Override entity unit_of_measurement | |
icon | string | Override entity icon | |
toggle | bool | false | Display a toggle (if supported) instead of state |
hide_state | bool | false | Hide the entity state |
name_state | string | Add name/header above the main entity state | |
primary | object | see below | Primary additional entity object |
secondary | object | see below | Secondary additional entity object (not to be confused with secondary_info ) |
tertiary | object | see below | Tertiary additional entity object (make sure there is enough room) |
info | object | see below | Additional entity object as secondary_info |
Name | Type | Default | Description |
---|---|---|---|
entity | string | Required | A valid entity_id |
name | string/bool | Override entity friendly_name (set to false to hide) | |
unit | string | Override entity unit_of_measurement | |
attribute | string | A valid attribute key for the specified entity | |
toggle | bool | false | Display a toggle if supported by domain |
* The info
object does not support toggle
type: entities
title: multiple-entity-row
entities:
- type: section
label: Primary
- entity: sensor.bedroom_temperature
type: custom:multiple-entity-row
primary:
entity: sensor.bedroom_max_temp
- type: section
label: Primary + Secondary
- entity: sensor.bedroom_temperature
type: custom:multiple-entity-row
primary:
entity: sensor.bedroom_min_temp
secondary:
entity: sensor.bedroom_max_temp
- type: section
label: Info (secondary_info)
- entity: sensor.bedroom_temperature
type: custom:multiple-entity-row
primary:
entity: sensor.bedroom_min_temp
secondary:
entity: sensor.bedroom_max_temp
info:
entity: sensor.bedroom_temperature
attribute: battery_level
name: Battery
unit: '%'
- type: section
label: Attributes
- entity: vacuum.vacuum_cleaner
type: custom:multiple-entity-row
primary:
entity: vacuum.vacuum_cleaner
attribute: battery_level
name: Battery
unit: '%'
secondary:
entity: vacuum.vacuum_cleaner
attribute: status
name: Status
- type: section
label: Toggle
- entity: switch.livingroom_tv
type: custom:multiple-entity-row
toggle: true
primary:
entity: sensor.livingroom_tv_power
secondary:
entity: sensor.livingroom_tv_power_total
- type: section
label: Hide state
- entity: switch.livingroom_tv
type: custom:multiple-entity-row
hide_state: true
primary:
entity: sensor.livingroom_tv_power
secondary:
entity: sensor.livingroom_tv_power_2
- type: section
label: Hide name
- entity: sensor.bedroom_temperature
type: custom:multiple-entity-row
primary:
entity: sensor.bedroom_min_temp
name: false
secondary:
entity: sensor.bedroom_max_temp
name: false
- type: section
label: Customization
- entity: sensor.bedroom_temperature
type: custom:multiple-entity-row
name: Custom Name
icon: mdi:fire
unit: °F
secondary_info: last-changed
primary:
name: custom name
entity: sensor.bedroom_max_temp
unit: temp
xiaomi-vacuum-card | -entity-row | multiple-entity-row | attribute-entity-row