#Change infomation showed in chip to Preset instead of Mode?

1 messages · Page 1 of 1 (latest)

north mountain
#

Hi

Wondering if it’s possible to change information shown to the preset instead of the mode?

See attached pictures

rotund reef
#

The standard HA badge can do it, seems like you're using custom mushroom though, i don't know about that capabilities

modern cipher
#

The default for a Mushroom card badge is the state. I'm guessing you're using a climate entity which "Fan only" would be its current state. To show an attribute from the entity, you would need to use a template chip.

type: custom:mushroom-chips-card
chips:
  - type: template
    entity: climate.hvac
    icon: mdi:thermometer
    content: "{{ state_attr(entity,'temperature') }}°" 
```EDIT: Changed from hard-coded entity in the content template to the variable.
north mountain
#

Thanks for suggestions. From that I got help from chatgtp and made it work.

  • type: template
    entity: climate.flexit_nordic
    icon: mdi:air-filter
    content: >
    {% set p = state_attr(entity, 'preset_mode') %}
    {% if p == 'home' %}
    Hjemme
    {% elif p == 'away' %}
    Borte
    {% elif p == 'boost' %}
    Boost
    {% else %}
    {{ p | default('Ukjent') }}
    {% endif %}
    tap_action:
    action: more-info
modern cipher
rotund reef
#

You don't need a template for this, it's built into the default badge...