#Change infomation showed in chip to Preset instead of Mode?
1 messages · Page 1 of 1 (latest)
The standard HA badge can do it, seems like you're using custom mushroom though, i don't know about that capabilities
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.
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
Glad you got it working. What you have there is an example of templating. It is super useful when trying to get something to work exactly how you want. The official docs: Templating and a guide that I put together: concepts (though it isn't done and I need to do more work on it) if you want to read more on the topic.
You don't need a template for this, it's built into the default badge...