Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nest SetMode command not allowed in current thermostat mode #75438

Closed
carleeno opened this issue Jul 19, 2022 · 16 comments · Fixed by #79445
Closed

Nest SetMode command not allowed in current thermostat mode #75438

carleeno opened this issue Jul 19, 2022 · 16 comments · Fixed by #79445
Assignees

Comments

@carleeno
Copy link

The problem

When sending a command to set the preset mode of a nest thermostat, and the thermostat is already in that mode, the action fails with the error:

Error setting HVAC mode: Error from API: 400: FAILED_PRECONDITION: sdm.devices.commands.ThermostatEco.SetMode command not allowed in current thermostat mode.: Bad Request

For example, when attempting to set preset mode to "none" while thermostat preset is already "none" (not eco) it will throw this error.
This causes any scripts/automations containing this action to stop execution, which is how I discovered the issue (a script wasn't completing other actions).

What version of Home Assistant Core has the issue?

2022.7.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

No response

Example YAML snippet

# run this twice:

service: climate.set_preset_mode
data:
  preset_mode: none
target:
  entity_id: climate.living_room_thermostat

Anything in the logs that might be useful for us?

Error setting HVAC mode: Error from API: 400: FAILED_PRECONDITION: sdm.devices.commands.ThermostatEco.SetMode command not allowed in current thermostat mode.: Bad Request

Additional information

No response

@probot-home-assistant
Copy link

nest documentation
nest source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (nest) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@allenporter
Copy link
Contributor

Thanks for the report. Can you include diagnostics information from when the failing service call is sent?

@carleeno
Copy link
Author

sure where can I find that?

@carleeno
Copy link
Author

Looking on the device page and log pages, I can't find diagnostics info/download. I'm still struggling with the new settings menu, and searching settings came up empty.

Also, for now I'll add some extra conditions to my automations to prevent them from attempting this step if the thermostat is already in the desired mode, to ensure the rest of the automation is able to continue. However typically it's not a problem to set a thermostat to a mode it's already in.

@carleeno
Copy link
Author

@allenporter
Copy link
Contributor

I was able to reproduce the issue, thank you for the report.

In the mean time, you may be able to set a condition in your automation, for example, to workaround by checking that the current preset mode is not eco mode.

@dlgoodr
Copy link

dlgoodr commented Jul 22, 2022

can reproduce same, and confirm workaround.

makes scenes hard, though.

@zyberwoof
Copy link

I'm running HASS Docker image "ghcr.io/home-assistant/home-assistant:stable", and I can confirm the same issue as well.

@sjd17
Copy link

sjd17 commented Aug 3, 2022

I started getting this error also on an automation that had been working fine for months. Adding a check for the mode prevents the error but I'm also having the problem that Home Assistant is apparently not able to read the current mode correctly sometimes. When my automation ran the last two days, I know that it was in eco mode. On Monday, it produced the error. Yesterday, I added the check but then it returned false when checking for eco mode.

@allenporter
Copy link
Contributor

Have diagnostics data?

@sjd17
Copy link

sjd17 commented Aug 3, 2022

@sjd17
Copy link

sjd17 commented Aug 3, 2022

It looked to be tied to the Home/Away mode in Nest. When I tested yesterday, I was just manually turning eco mode on/off and then trying to toggle back through manually running the actions for my automation. That worked fine but if I set Nest to Away and that triggers eco mode, then I get the error if I try to turn off eco mode from HA. My Nest integration does not appear to be able to read the preset mode under any conditions, it always thinks it is set to none.

@Wetzel402
Copy link

I'm assuming Nest/Google made an api change on the backend. I'm seeing this issue also on HA 2022.6.7.

@sjd17
Copy link

sjd17 commented Oct 8, 2022

Well, the update removed the error but didn't solve the problem. I no longer get an error when I try to change out of eco mode, but it just does nothing. As before, if i manually set it to eco mode, it works fine. If eco mode is set because Nest changes from Home to Away (ether manually or automatically), then it will not stop eco mode.

@allenporter
Copy link
Contributor

My impression is that is a neat API bug where it's not sending updates on that transition. I previously reported this to nest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants