Mushroom chip card - display attributes

Hi,

I have some sensors (Toyota integration, daily, weekly, monthly stats) which contain very usefull attributes.

Example:

Average speed
32.1
Countries
NO
Duration
6:07:17
Total fuel consumed
10.54
Average fuel consumed
5.16
EV distance
100.9
EV duration
3:40:28
From date
April 8, 2024
To date
April 10, 2024

Now, I woud like to display, for example, “Total fuel consumed” attribute from sensor in Mushroom Chip card, but am failing to do so.

I am alyays gettig main value from the sensor (in this case, mileage).

My last attempt:

type: custom:mushroom-chips-card
chips:
  - type: entity
    entity: sensor.bela_ladja_current_day_statistics
    primary: >-
      {{ state_attr('sensor.bela_ladja_current_day_statistics',
      'Total_fuel_consumed') }}

How can I reach for those attributes within certain sensors?

Thanks in advance!

Best regards,

Mario.

Switch to a template chip

type: custom:mushroom-chips-card
chips:
  - type: template
    icon: mdi:fan 
    entity: sensor.basement_sensor
    content: "{{ state_attr('fan.bedroom_fan','direction') }}"

image

1 Like

Hi,

Thanks! That solved it! :slight_smile:

Best regards,

Mario.

Hello,
I am trying to do a similar thing with no success.
I need a chip card that shows the position attribute and the “%” char of a roller shutter. I can see those attributes in a normal entity card like showing below:

type: entity
state_color: true
visibility:
  - condition: state
    entity: cover.roller_shutter_controller_2
    state_not: closed
entity: cover.roller_shutter_controller_2
attribute: current_position
unit: '%'

Unfortunately I cannot find a way to do it although I have tried the above mentioned solution:

Is there any way to do it?
Thanks,