### The problem
Nest thermostat integration (using the Google Cloud API) works …normally for several hours or even days but then fails and the integration needs to be reloaded to work again. It seems that the more recent versions of core have made this problem worse as I am now having to restart the integration almost daily.
Integration will show as "Off" with no other modes when it has failed. Reloading the integration restores the normal HVAC modes. Looking at the history for the device when the integration has failed, it will show that it was turned off at some point earlier although there was nothing commanding it to do so.
### What version of Home Assistant Core has the issue?
core-2023.4.5
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Nest
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/nest/
### Diagnostics information
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2023.4.5",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.10",
"docker": true,
"arch": "x86_64",
"timezone": "America/Los_Angeles",
"os_name": "Linux",
"os_version": "6.1.24",
"supervisor": "2023.04.1",
"host_os": "Home Assistant OS 10.0",
"docker_version": "23.0.3",
"chassis": "embedded",
"run_as_root": true
},
"custom_components": {
"frigate": {
"version": "4.0.0",
"requirements": [
"pytz==2022.7"
]
},
"hacs": {
"version": "1.32.1",
"requirements": [
"aiogithubapi>=22.10.1"
]
}
},
"integration_manifest": {
"domain": "nest",
"name": "Google Nest",
"after_dependencies": [
"media_source"
],
"codeowners": [
"@allenporter"
],
"config_flow": true,
"dependencies": [
"ffmpeg",
"http",
"application_credentials"
],
"dhcp": [
{
"macaddress": "18B430*"
},
{
"macaddress": "641666*"
},
{
"macaddress": "D8EB46*"
}
],
"documentation": "https://www.home-assistant.io/integrations/nest",
"iot_class": "cloud_push",
"loggers": [
"google_nest_sdm",
"nest"
],
"quality_scale": "platinum",
"requirements": [
"python-nest==4.2.0",
"google-nest-sdm==2.2.4"
],
"is_built_in": true
},
"data": {
"data": {
"name": "**REDACTED**",
"type": "sdm.devices.types.THERMOSTAT",
"assignee": "**REDACTED**",
"traits": {
"sdm.devices.traits.Info": {
"customName": "**REDACTED**"
},
"sdm.devices.traits.Humidity": {
"ambientHumidityPercent": 64
},
"sdm.devices.traits.Connectivity": {
"status": "ONLINE"
},
"sdm.devices.traits.Fan": {
"timerMode": "OFF"
},
"sdm.devices.traits.ThermostatMode": {
"mode": "HEATCOOL",
"availableModes": [
"HEAT",
"COOL",
"HEATCOOL",
"OFF"
]
},
"sdm.devices.traits.ThermostatEco": {
"availableModes": [
"OFF",
"MANUAL_ECO"
],
"mode": "OFF",
"heatCelsius": 15.555527,
"coolCelsius": 29.444397
},
"sdm.devices.traits.ThermostatHvac": {
"status": "OFF"
},
"sdm.devices.traits.Settings": {
"temperatureScale": "FAHRENHEIT"
},
"sdm.devices.traits.ThermostatTemperatureSetpoint": {
"heatCelsius": 20.555555,
"coolCelsius": 23.333334
},
"sdm.devices.traits.Temperature": {
"ambientTemperatureCelsius": 20.839996
}
},
"parentRelations": [
{
"parent": "**REDACTED**",
"displayName": "**REDACTED**"
}
]
},
"command": {
"sdm.devices.commands.ThermostatMode.SetMode_count": 1,
"sdm.devices.commands.ThermostatMode.SetMode_sum": 755,
"sdm.devices.commands.Fan.SetTimer_count": 1,
"sdm.devices.commands.Fan.SetTimer_sum": 771
},
"event_media": {
"event": 6
}
}
}
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
```txt
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/nest/climate_sdm.py", line 287, in async_set_hvac_mode
raise ValueError(f"Unsupported hvac_mode '{hvac_mode}'")
ValueError: Unsupported hvac_mode 'heat_cool'
2023-05-09 19:30:00.195 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139724931415632] Unsupported hvac_mode 'heat_cool'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/nest/climate_sdm.py", line 287, in async_set_hvac_mode
raise ValueError(f"Unsupported hvac_mode '{hvac_mode}'")
ValueError: Unsupported hvac_mode 'heat_cool'
2023-05-09 19:51:25.585 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [139724872852112] Disconnected: Did not receive auth message within 10 seconds
2023-05-09 20:00:00.203 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139724931415632] Unsupported hvac_mode 'heat_cool'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/nest/climate_sdm.py", line 287, in async_set_hvac_mode
raise ValueError(f"Unsupported hvac_mode '{hvac_mode}'")
ValueError: Unsupported hvac_mode 'heat_cool'
2023-05-09 20:30:00.223 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139724931415632] Unsupported hvac_mode 'heat_cool'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1820, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/nest/climate_sdm.py", line 287, in async_set_hvac_mode
raise ValueError(f"Unsupported hvac_mode '{hvac_mode}'")
ValueError: Unsupported hvac_mode 'heat_cool'
```
### Additional information
_No response_