Lovelace: Attributes card / entity row

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.
5 Likes

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!

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

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

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.

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

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?

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

Thanks that did it

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

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
1 Like

You can se my whole HA config here:
https://github.com/mgrefsrud/home-assistant-config

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

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

@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.

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.

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

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

1 Like

Hi! I have a question, I’ve 2 cards showing me the device trackers in home and not_home, these cards are monster-cards but I want to display ip address from device tracker attributes if is at home, my question is Can I put attributes card inside monster card?? because I need to filter.

My yaml:

- type: custom:monster-card
card:
  type: entities
  title: Conectadowws
filter:
  include:
    - domain: device_tracker
      state: home
      options:
        type: "custom:entity-attributes-card"
        title: Attributes Card
        heading_name: List
        heading_state: States
        filter:
          include:
            - key: device_tracker.*.ip

Thanks

1 Like

sorry to bump this, but only recently found this card…
was hoping to be able to show all attributes of an entity, in my case a device_tracker.life360

tried it without filter, but that isn’t allowed, and any other mask * either errors out, or shows me all attributes in the HA instance…

  - type: custom:entity-attributes-card
    title: "Travels"
    entity: device_tracker.life360
    filter:
      include:
        - key: '*.*.*'

what should I enter for key: to have it only show all attributes of that device_tracker,
please have a look, thanks!

installed latest version here: https://github.com/custom-cards/entity-attributes-card

only way I’ve gotten a correct result is to repeat the entity_id of the entity under the filter listing, which seems superfluous if an entity is already defined in the main config? Is this per design, or am I doing something incorrectly here.