Help extracting attribute from thermostat

Hi, I have successfully created a home heating/cooling automation using user-settable temperatures for rooms and remotely controlled Flair Smart Vents. Everything is working, except one thing…I am using a current state node to determine if the thermostat is in heating or cooling mode, but this doesn’t tell me if the thermostat is currently heating or cooling. I think I need to extract an attribute from the state in order to accomplish that. I’ve started doing my own research, and will continue to do so, but I thought I’d post here and see if anyone has done something like this before and could provide some helpful guidance.

Here’s a screenshot of one of the smart vent automations:

You can see that I pass my temperature high/low triggers to a current state node, where I determine if I’m in heating or cooling mode. I think this is where I need to extract an attribute. I am abysmal with JSON syntax. I am just starting to learn, but it just seems so…daunting. Any help is much appreciated.

This might be what you’ve done already but it’s about all the info you can get from an entity.

inject node - current state node (only need the entity you want to examine) - debug node (set to complete msg object)

Hit Inject and go through the output in the debug panel and see if there is anything there you can use. If you hover your mouse over the links a few small icons will pop up and you can copy the path or value of each item.

Thermostats have the mode they are in as it’s state heat/cool/off. then it has an action cooling/heating/idle meaning is it calling for heat/ac or is it idle because the temp is in range.

I think you are looking for the action of the thermostat, you can use this in the current state.

Screenshot 2024-02-08 114236

Thank you both. Both of these answers helped me find the attribute and then implement the syntax necessary to get my desired automation working. Much appreciated!