Lovelace: Attributes card / entity row


#1

Attributes card

Attributes are not that popular because they are hidden inside more info dialog and harder to display. This card aims to simplify it for things like package trackers & other sensors that have more attributes to bring those attributes forward on the main page.

enitty-attributes-card

attributes-in-entities

You can find the code here

Instructions

The instructions are also found on the above repo.

  1. Download entity-attributes-card.js
  2. Place the file in your config/www folder
  3. Include the card code in your ui-lovelace.yaml
resources:
  - url: /local/entity-attributes-card.js?v=2
    type: js
  1. Write configuration for the card in your ui-lovelace.yaml

Example

- type: custom:entity-attributes-card
  title: Attributes Card
  heading_name: List
  heading_state: States
  filter:
    include:
      - key: climate.hvac.*
      - key: media_player.bedroom.app_name
        name: Application
      - key: media_player.bedroom.media_title
        name: Media center
      - climate.heatpump.current_temperature

How to embed this inside entities card:

screen shot 2018-07-09 at 13 47 38

- type: entities
  title: Entities card
  entities:
    - media_player.bedroom
    - type: custom:entity-attributes-card
      entity: media_player.bedroom
      filter:
        include:
          - media_player.bedroom.app_name
          - media_player.bedroom.media_title
    - sensor.short_name
    - sensor.battery_sensor
  1. Reload your Lovelace tab (no need to restart Home Assistant or other things) and you should see the card.

Unifi sensor custom component
Using Attributes in Lovelace
Using Attributes in Lovelace
Show sensor attributes in Lovelace as with custom-ui-state-card?
#2

Nice. I was only wondering yesterday if something like this was possible yet when I was looking at an entity with some hidden values in an attribute that I really wanted to expose to the UI. Will give it a go when I get home!


#3

You can check dev branch for goodies. I will update post once I merge to master.

Now you can name attributes and have them from multiple entities


#4

Would you be able to have an all attributes list? (perhaps with excluded attributes?). This is because I have some sensors that have a varying number of attributes with unknown value and unknown attribute names.

James


#5

It’s best to just to use the monster-card and filter on the unknown for state or attribute values if you know which attributes.

I am not sure of your actual use case, but try monster card first.


#6

Thanks. I’ve posted on the monster card thread. I can’t figure out how I would do what I’m trying!


#7

i am trying to add this card to my love lace, and it looks like the card loads correectly, but i am not bale to configure it correctly. What i am trying to do is to get battery_level from my motion sensors.
Preformatted text
- type: “custom:entity-attributes-card”
entity: binary_sensor.1_hall_switch
attributes:
- “battery_level”
This is the config in the lovelace_ui file, and the error i get in the ui is:
Cannot read property ‘include’ of undefined

What am i doing wrong?


#8

The docs in the original post is out of date. Use https://github.com/ciotlosm/custom-lovelace/blob/master/entity-attributes-card/README.md until I fix that


#9

Thanks that did it


#10

Can you post your final config for being able to display the battery level?


#11

Here is the code from my Lovelace UI file:

  - type: custom:entity-attributes-card
    title: Batteri
    heading_name: Enhet
    heading_state: "% Batteri"
    filter:
      include:
        - key: binary_sensor.1_hall_front_door_sensor.battery_level
          name: Sensor 1 Gang Utgangsdør

#12

You can se my whole HA config here:


#13

Is there any way to remove the shadow from the card when it’s nested inside another one?


#14

Please add an issue on github with this enhancement and I’ll get to it


#15

@ciotlosm could you please tell me how to get the title behind the media_player.bedroom entity in your “Entites card” view? Mine always shows “playing”. I’m using Chromecast devices and groups.

Thanks.


#16

You need to find the title. Use dev-info panel to see which is the attribute for title and on which entity it shows up.


#17

Sure, thats the way how to display it in the attributes card. That is not the problem. Actually my media_player entity shows the acutal state.
image

I like to show the title on the media_player entity (instead of actual state) like you do (yellow marked)

image


#18

I use the vertical-stack-in-card Card to show the cards together without a border around the entity-attribute-card