custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept
GNU General Public License v3.0
198 stars 23 forks source link

How to select object-based Attribute? #87

Open ChristophCaina opened 1 year ago

ChristophCaina commented 1 year ago

Hi, I've just switched from the attribues card to the flex-table-card in the hope, it would allow me to fix one of my current issues... Unfortunately, it seems that I am not able to wirte down my yaml in a way that I can do, what I want ... maybe, someone can give me some help?

I have a sensor with the following attributes:

engine:
  engine_type: iV
  power_in_kw: 132
  battery_capacity_kwh: 62
model: ŠKODA Enyaq 60 iV 60/2022-05-17
assumed_state: true
icon: mdi:information-outline
friendly_name: Enyaq iV60 Car Info

Now, I want to display engine.power_in_kw as well as engine.battery_capacity within the flex table.

it should be something like that:
power_in_kw 132
battery_capacity_kwh 62
Veejer commented 1 year ago

I have run into the same issue. See #86 In the meantime, you can do something like this:

data: engine
modify: x.power_in_kw
daringer commented 10 months ago

actually this should work:

data: engine.engine_type 

it might be needed to put a 0 in between:

data: engine.0.engine_type