Climate thermostat "HVAC action" is unreliable

Woke up this morning to my dashboard thermostat saying “heating” despite already 10 degrees above setting.

I checked the device in-person (Nest), and it was not calling for heat, so the hvac_action attribute of my climate entity was stale (I verified within Developer Tools).
I adjusted the temperature both from the device in-person, and the HA dashboard, with the same results: the set-temperature correctly changed but action remained “heating” within HA.
Finally I adjusted the temperature very high to make the real device indeed enter “heating”, then lowered it back down and this time the dashboard updated to reflect “off”.

It looks like I need to rewrite my automations to a template that manually check the current temperature against the temperature setting, instead of relying on hvac_action, because the temperature data is sent regularly, whereas if the hvac_action attribute update gets lost, I’m screwed.

{{ (state_attr('climate.nest_thermostat', 'current_temperature')|int) < (state_attr('climate.nest_thermostat', 'temperature')|int) }}

Any other suggestions or insight?
Do I need to up the Acknowledgement deadline for the project subscription on Google Cloud?
Can I use the subscription “Messages” history to debug this? Unfortunately it appears empty even though I’ve adjusted the thermostat within the message retention duration limit.

Spotty information, here…

What integration is climate.my_thermostat?
What automation?
Where does Google Cloud fit in the picture?

I’ve renamed it nest_thermostat to be clearer.

The attribute of the entity is stale, whether there is an automation setup for it or not.

This is how Nest integrates.

My new automation is working, since it doesn’t rely on hvac_action at all.

I’m interested to know where/how the breakdown occurs, it’s interesting that the hvac_action attribute erroneously remains heating even as the climate entity continually has state change events whereby the other attributes update correctly. Is it repeatedly being sent the wrong data, or is HA using cached data? I don’t know the architecture.

Just trying to learn the scope and mechanisms so we can avoid this for others, because hvac_action, at least, is factually unreliable at the moment, at least for a Nest integration. Is it only Nest? Does each Integration have different attributes that may or may not be updated from the hardware with each state_change? Is it down to the Integration implementation? Is it Google Cloud failing to send the latest hardware data and using its own invalid cache?

I’m trying to look for myself but not seeing any message data on Google Cloud, so I’m probably doing something wrong, hence why I’m asking if someone else has experience analyzing the Google Cloud (Nest) ➡️ Home Assistant messages. Though I would need to reproduce the bug which might be tricky now, so hoping someone else might have answers. :frowning:

You definitely have the right idea for debugging events.

The nest integration page explains how to debug message issues. You can crank up logging to see all nest events that arrive to home assistant including the values of the HVAC modes etc. Then you can see on the publishing side what’s being sent If that helps.

1 Like

Specifically logging for homeassistant.components.nest: debug will give you every message recieved. Them we can know if this is a home assistant nest bug, or a maybe a Google bug.

If you restart home assistant it will query the API which may also be useful to see what state it’s in. If it’s still in a bad state based on the current return value from the API that is telling.

1 Like

For anyone looking at this - I’ve recently found the same problem with my meross thermostat. Used to work flawlessly using hvac_action, but broken sometime since late 2022. Suspect I"ll go down the same path as @CodeOptimist unless someone has better ideas.

Did anyone ever find a solution for this please as some of my Moes Zigbee eTRVs do the same thing. Using a template to compare the temps is a work around but it used to work on hvac_action :frowning: Thanks