Mini climate card issue

I’m using the mini climate card but I can’t manage to get more information then the basic version with default information. I want to have the fan mode and swing mode in my front end view.
Some help is really appriciated. Can someone tell me what I’m doing wrong?

      - type: custom:mini-climate
        entity: climate.zithoek
        name: Zithoek Test
        fan_modes:
          hide: off
          icon: mdi:fan
          order: 0
          active: (state, entity) => entity.state !== 'off'
          source:
            auto: auto
            '1': '1'
            '2': '2'
            '3': '3'
            '4': '4'
            '5': '5'
            # filter usage example
            __filter: >
              (source, state, entity) => entity.attributes
                .fan_modes_al.map(fan_modes => source.find(s => s.id === fan_modes))
                .filter(fan_modes=>fan_modes)
          change_action: >
            (selected, state, entity) => this.call_service('climate', 'set_fan_modes', { entity_id: entity.entity_id, fan_modes: selected })


I don’t use the card, but when I compare the example with your code, I notice the following:

example: fan_mode:

your code: fan_modes:

Your code:


source:
            auto: auto
            '1': '1'
            '2': '2'
            '3': '3'
            '4': '4'
            '5': '5'

Entities’ attributes info:

swing_modes:

auto

1_up

2

3

4

5_down

P.S.:

Note the full example on the component site

Thx Pedolsky, however I first tried to copy paste and use fan_mode , but in my Airco configuration it mentions fan_modes so I tried changing this.
Non of these two options made any difference.

You mean the example on the component’s site doesn’t work for you?

Correct, even with the demo code i get only the default buttons.

Then I would have a look at the issues (open and closed) if one matches and/or uninstall and reinstall the component. Sometimes HACS goes crazy.

My problem that Why it show the top and bottom the fan mode. I uninstall and reinstall component, and rewrite the code. I try write to code hide bottom fan icon, but I can not remowe. I just want to see it on top.

type: custom:mini-climate
entity: climate.node_29
name: HaloKlima
secondary_info:
type: fan-mode-dropdown
toggle:
default: ‘on’
hide: ‘on’
buttons:
swing_mode:
type: dropdown
icon: mdi:approximately-equal
state:
attribute: swing_mode
active: state => state !== ‘off’
source:
‘off’: ‘off’
horizontal: Horizontal
change_action: >
(selected, state, entity) => this.call_service(‘climate’,
‘set_swing_mode’, { entity_id: entity.entity_id, swing_mode: selected })
turbo:
icon: mdi:weather-hurricane
topic: dahatsu/turbo/set
state:
attribute: turbo
mapper: ‘(state, entity) => state ? ‘‘on’’: ‘‘off’’’
disabled: (state, entity) => !entity.attributes.turbo_al
toggle_action: >
(state) => this.call_service(‘mqtt’, ‘publish’, { payload:
this.toggle_state(state), topic: this.topic, retain: false, qos: 1 })
eco:
icon: mdi:leaf
topic: dahatsu/eco/set
state:
attribute: eco
mapper: ‘(state, entity) => state ? ‘‘on’’: ‘‘off’’’
disabled: (state, entity) => !entity.attributes.eco_al
toggle_action: >
(state) => this.call_service(‘mqtt’, ‘publish’, { payload:
this.toggle_state(state), topic: this.topic, retain: false, qos: 1 })
health:
icon: mdi:emoticon-happy-outline
topic: dahatsu/health/set
state:
attribute: health
mapper: ‘(state, entity) => state ? ‘‘on’’: ‘‘off’’’
disabled: (state, entity) => !entity.attributes.health_al
toggle_action: >
(state) => this.call_service(‘mqtt’, ‘publish’, { payload:
this.toggle_state(state), topic: this.topic, retain: false, qos: 1 })
power_switch:
icon: mdi:power-plug
state:
entity: switch.metered_wall_plug_switch
indicators:
humidity:
icon: mdi:water
unit: ‘%’
round: 1
source:
entity: sensor.sensor_temp_hum_pre_kitchen_humidity
power_consumption:
icon: mdi:flash
unit: W
round: 1
source:
entity: sensor.metered_wall_plug_switch_power
power:
icon: mdi:power-plug
source:
entity: switch.metered_wall_plug_switch
values:
‘on’: вкл
‘off’: выкл
mapper: value => this.source.values[value]

Hi @pedolsky and others,
I’ve successfully installed the custom card, but for some reason the up and down chevrons and the buttons below the current and target temperatures seem to be transparent no matter what I do. I can’t see them at all unless I hover over them and then there is a slight outline. I’ve tried changing the theme variables to be white (e.g., icons and buttons), but it had no impact. I’ve included a pic of my card and you can see only a slight outline of the “up” chevron button because I was hovering over it. Any suggestions?

I have the same issue even using the code that defines the icons for target temperature does no good.

image

1 Like

Thanks for your card. I like this a lot better than the buky one that comes with Home Assistant.

I do have a silly question though … how do I use the indicators to display an attribute? What I’m trying to achieve is something like this (which I know doesn’t work, but I’m trying to figure out how to get it to work):

entity: climate.dining_room
type: custom:mini-climate
indicators:
  humidity:
    icon:
      template: () => 'mdi:water'
    unit: '%'
    round: 1
    source:
      entity: '{{ states.climate.dining_room.attributes.current_humidity }}'

Any help would be appreciated.

To answer Torvin’s question: to use an attribute as the source of an indicator, do this

indicators:
  humidity:
    icon:
      template: () => 'mdi:water'
      unit: '%'
      round: 1
    source:
      attribute: current_humidity

I found that my hvac action button was transparent if I didn’t have a Yaml option for an hvac_mode source available: in the case below, I got a transparent icon for the hvac heating icon until I put in an auto mode which can be returned by my climate device.

I’ve had to spend some time working through the details for this to try and get an idea of coding it - top tip: tell ChatGPT to ingest the github info page and then quiz it on configuration code - it doesn’t get it perfect but it understands the documentation a lot better than I did!

hvac_mode:
  source:
    off:
      icon: mdi:power
      name: off
    heat:
      icon: mdi:fire
      name: heat
    auto:
      icon: mdi:fire
      name: auto