Get state of hvac_modes climate attribute

Hi guys,

I am trying to display the current state of my Air con, but can only get a list of attributes from hvac_modes. See attached image.
I don’t have a separate hvac_mode attribute, only modes.
Is there a way to display it?
I can get the state in the templates via {{ states('climate.daikin_ac') }}, this returns “Heat”, but not sure how to display in the card.

Thanks.


image

1 Like

I guess it depends on A/C manufacturer, but can you use the “hvac_action” attribute? That shows you current A/C state.

My AC doesn’t have _action attribute.
I can get the state value in the developer tools and in templates, but cannot display it on the card.

Go to Developer Tools > States, find climate.daikin_ac, and examine the Attributes column. Post a screenshot here.

It’s same as States:

It certainly doesn’t have an hvac_action attribute. Therefore the only thing it can report is its current hvac_mode , in its state value (according to your screenshot, it is currently off).

If it did have an hvac_action attribute, it could report, for example, that its mode is heat and its action is idle which means its in heat mode but it’s not currently heating but idle.

That’s what I want to see somehow in the entity card. But I do not want to see all available modes (as on my first picture) I want to see the current state only - eg. Heat or OFF and nothing extra.

I can get the current stati with the template using {{ states('climate.daikin_ac') }} but not sure how to put it into the card.

You don’t even need a template if you use the Entities card or an Entity card.

I’m curious to know why the default Thermostat card doesn’t meet your needs. It also displays a climate entity’s state (and other things).

I don’t want to use a template, this is just to show that there is a way to get the current state of the entity or it’s attribute, but I cannot find a way to display it on the entity card.

image

The reason why I need this is that it’s difficult to understand sometimes what the default Thermostat card is showing. I use it every day but sometimes it confuses and takes time to see if aircon is off or idle or running. I am getting used to it, but as I am not the only user of the system in my house I want to make it simple for everyone.

What if you create a text helper with a name A/C mode and set it’s value with an automation everytime the AC mode changes (set the helper value to {{states(‘climate.daikin_ac’)}} ) and then use this helper as an entity to show on your card?

1 Like

That is a great idea, maybe not ideal but works for me. Never used helpers before, good to know :slight_smile:
The only thing is - is it possible to make it not as an input box, just a text value:

Make a Template Sensor, called sensor.daikin_ac, that displays the state of climate.daikin_ac. Then add sensor.daikin_ac to your existing Entities card.

sensor:
  - platform: template
    sensors:
      daikin_ac:
        value_template: "{{ states('climate.daikin_ac') }}"
3 Likes

That’s exactly what I need. Sometimes you have the solution right in front of you, but you cant see it :slight_smile:
Thank you.

image

1 Like

How to color the icon of the AC_state : Blue for IDLE and yellow for heating?