Skip to content

Unable to set any modes outside of Off, Cool, Auto #47

@palazzem

Description

@palazzem

Hello!
I was investigating an issue in Home Assistant for an integration (Tado) that uses this library.

TL;DR from Home Assistant I can only use [Off, Cool, Auto] modes. If I set another mode (e.g. Dry) I get an error from the Tado API. I wrote down my investigation here if you are curious about the triaging I did.

To summarize, I've reproduced the issue by using this library so it seems it's not a problem with HA. Here you can find the snippet I used:

from PyTado.interface import Tado
tado = Tado(username, password)
# Zone 8 is the AC used in the HA test above
tado.setZoneOverlay(8, "MANUAL", deviceType="AIR_CONDITIONING", fanSpeed="AUTO", mode="DRY", swing="OFF")

# Returns:
# {'errors': [{'code': 'setting.notSupported', 'title': 'fan speed not in supported fan speeds [AUTO, HIGH, LOW, MIDDLE]'}]}

I found that (code) if setTemp is not set, fanSpeed and swing are not sent as parameters during the API call. If I do a change to send them regardless (I move both outside of the if clause), then this works as expected.

I'm opening this issue to understand better what it could be and I have a few questions:

  1. Are you aware why some people get this error, while others are not? Do you know if Tado (the actual product) registers devices in a different way, and so some AC/remote requires fanSpeed and swing set?
  2. Do you know why the code sends fan speed and swing only if a temperature is set? What is the rationale around it?
  3. Do you know what are the implications of sending these values regardless of the temperature? I can submit the change for your review, but I don't know if I'm going to break something.

Thank you very much in advance!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions