I’m wanting to display the current HA climate action attribute of my Daikin AC, on a status page of the 16x2 LCD on a current project I have. I am so far unable though, LCD shows nothing where I hoped to see the attribute text.
I think I can get this attribute as described here (but perhaps this is not the case): Climate Entity | Home Assistant Developer Docs (home-assistant.io)
Got it working. Your tips about Developer tools attribute names was the missing link.
Although I had looked at the states in Dev Tools list before, I’d not actually selected the climate entity in the ‘Set state’ field (as that seemed counter intuitive to do when not setting a state). When I selected climate.daikin_ac the full list of applicable attributes is displayed. The attribute is not what’s in the climate entity docs…
So this works, and I can display on the LCD fine now thanks.
- platform: homeassistant
id: ac_current_mode
entity_id: climate.daikin_ac
attribute: hvac_action
internal: true
The snippet of LCD code.
} else if (id(display_page_id) == 4) {
it.printf(0, 0, "AC status %s ", id(ac_current_mode).state.c_str());
FWIW I have some example code here: HVAC - VAV control via ESPHome - #3 by zagnuts - the trick if any is to work out if you need to refer to the entity from home assistant as a sensor or text sensor, and how to then work with that to display properly eg id(name).state or id(name).state.c_str()