core icon indicating copy to clipboard operation
core copied to clipboard

Tado : handle fanLevel and verticalSwing

Open zoic21 opened this issue 2 years ago • 16 comments

The problem

Hello,

I have a tado AC V3+ and it's not possible to set swings and fan speed.

What version of Home Assistant Core has the issue?

core-2023.6.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tado

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tado

Diagnostics information

Here capabilities return by tado :

{"type": "AIR_CONDITIONING", "HEAT": {"temperatures": {"celsius": {"min": 16, "max": 30, "step": 1.0}, "fahrenheit": {"min": 61, "max": 86, "step": 1.0}}, "fanLevel": ["LEVEL2", "LEVEL4", "LEVEL3", "AUTO", "LEVEL1"], "verticalSwing": ["ON", "OFF"]}, "AUTO": {"temperatures": {"celsius": {"min": 18, "max": 30, "step": 1.0}, "fahrenheit": {"min": 64, "max": 86, "step": 1.0}}, "fanLevel": ["LEVEL2", "LEVEL4", "LEVEL3", "AUTO", "LEVEL1"], "verticalSwing": ["ON", "OFF"]}, "FAN": {"fanLevel": ["LEVEL2", "LEVEL4", "LEVEL3", "AUTO", "LEVEL1"], "verticalSwing": ["ON", "OFF"]}, "COOL": {"temperatures": {"celsius": {"min": 18, "max": 30, "step": 1.0}, "fahrenheit": {"min": 64, "max": 86, "step": 1.0}}, "fanLevel": ["LEVEL2", "LEVEL4", "LEVEL3", "AUTO", "LEVEL1"], "verticalSwing": ["ON", "OFF"]}, "DRY": {"temperatures": {"celsius": {"min": 18, "max": 30, "step": 1.0}, "fahrenheit": {"min": 64, "max": 86, "step": 1.0}}, "verticalSwing": ["ON", "OFF"]}, "initialStates": {"mode": "COOL", "modes": {"COOL": {"temperature": {"celsius": 24, "fahrenheit": 75}, "fanLevel": "LEVEL2", "verticalSwing": "OFF"}, "HEAT": {"temperature": {"celsius": 23, "fahrenheit": 74}, "fanLevel": "LEVEL2", "verticalSwing": "OFF"}, "DRY": {"temperature": {"celsius": 24, "fahrenheit": 75}, "verticalSwing": "OFF"}, "FAN": {"fanLevel": "LEVEL2", "verticalSwing": "OFF"}, "AUTO": {"temperature": {"celsius": 24, "fahrenheit": 75}, "fanLevel": "LEVEL2", "verticalSwing": "OFF"}}}}

As you can see I don't have fanSpeeds or swings key but I have fanLevel and verticalSwing key. So when integration check the capatibility it don't see fan speed (https://github.com/home-assistant/core/blob/dev/homeassistant/components/tado/climate.py#L154) and swings (https://github.com/home-assistant/core/blob/dev/homeassistant/components/tado/climate.py#L151C40-L151C46) possibilities.

I don't known why I have got, maybe a change on tado side, but can you handle this in plugin ?

Thanks in advance

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

zoic21 avatar Jun 27 '23 15:06 zoic21

Hey there @michaelarnauts, @chiefdragon, mind taking a look at this issue as it has been labeled with an integration (tado) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tado can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tado Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


tado documentation tado source (message by IssueLinks)

home-assistant[bot] avatar Jun 27 '23 15:06 home-assistant[bot]

Could you add UP, MID-UP, MID, MID-DOWN,DOWN support for Vertical Swing AND LEFT, MID-LEFT,MID,MID-RIGHT,RIGHT, ON, OFF support for Horizonal SWING? And And support to activate Smart Schedule

mrli868 avatar Jun 29 '23 12:06 mrli868

is there any up date on this ?

mrli868 avatar Jul 26 '23 15:07 mrli868

I am no owner of an AC, yet I might be able to help around. What I do need, if you're able to, is the JSON that is currently being send via the Tado API. You can find this if you use the developer console in your browser and look for the call containing set overlay zone. Based on this I'd might be able to mimic the correct request. Would you be able to send this JSON request?

erwindouna avatar Aug 11 '23 06:08 erwindouna

@erwindouna I cannot set specific position for swings on my AC, but maybe I can help with the request payload?

It's a PUT to /api/v2/homes/<xxx>/zones/<y>/overlay

{
   "termination":{
      "typeSkillBasedApp":"MANUAL"
   },
   "setting":{
      "type":"AIR_CONDITIONING",
      "power":"ON",
      "mode":"COOL",
      "temperature":{
         "celsius":25,
         "fahrenheit":77
      },
      "fanLevel":"LEVEL2",
      "verticalSwing":"ON",
      "horizontalSwing":"OFF",
      "light":"ON"
   }
}

vargash avatar Aug 21 '23 14:08 vargash

@erwindouna I cannot set specific position for swings on my AC, but maybe I can help with the request payload?

It's a PUT to /api/v2/homes/<xxx>/zones/<y>/overlay

Thanks for checking, that's very useful to me. Whlist digging into the PyTado library, I see there isn't any support, even in the latest function for the verticalSwing and horizontalSwing. Creating a new fork of PyTado might be a solution, to actively develop these parts and keep them integrated in Home Assistant. Right now the library is not that much actively developed.

erwindouna avatar Aug 21 '23 14:08 erwindouna

@erwindouna As I posted in #97261 there is a pyTado fork already, https://pypi.org/project/python-tado/ ( https://github.com/wmalgadey/PyTado )

I wish this helps to get this issue fixed soon.

neonsp avatar Oct 25 '23 09:10 neonsp

@erwindouna As I posted in #97261 there is a pyTado fork already, https://pypi.org/project/python-tado/ ( https://github.com/wmalgadey/PyTado )

I wish this helps to get this issue fixed soon.

That's the one already integrated within HA. We need to bump the version to a higher level. I think we can do that now, whereas PyTado made a new release fixing a breaking change impacting my last attempt two months ago.

erwindouna avatar Oct 25 '23 12:10 erwindouna

It would be great if fan control and swing could be added to HomeAssistant's Tado airconditioning control.

I have started using it in automations, but the fan noise caused by the default settings cause us still to use the Tado app to slow down the fan.

StreborStrebor avatar Nov 06 '23 09:11 StreborStrebor

Same here, I would love to see this feature in HA!

ptoujas avatar Nov 15 '23 21:11 ptoujas

Will investigate in a bit and try to provide a solution! :)

erwindouna avatar Nov 15 '23 22:11 erwindouna

@erwindouna Let me know if I can help you testing or anything. I could even give you access to one AC device if you need.

neonsp avatar Nov 15 '23 22:11 neonsp

@erwindouna Let me know if I can help you testing or anything. I could even give you access to one AC device if you need.

Great offer, thanks! When I finish other work on Tado, I'll pick this up. 👍

erwindouna avatar Nov 16 '23 07:11 erwindouna

Really interested too to see those features in HA !

Ezor avatar Nov 24 '23 17:11 Ezor

Did you manage to find a solution or a workaround ?

Thanks Xavier

xavierdejakarta avatar Jan 13 '24 09:01 xavierdejakarta

I'm not sure if this is related, but I've found that I can set the fan speed (auto/low/med/high) and vertical swing (on/off) whilst using the Cooling mode, but not during Fan mode. When I attempt to set either option in Fan mode, nothing happens.

I don't really know enough to delve into the code to see if I can understand why this might be, just wanted to throw it out there just in case it helps with troubleshooting.

inversation avatar Feb 05 '24 22:02 inversation

I also have great interest in this feature!

Slowmover321 avatar Feb 13 '24 20:02 Slowmover321

same trouble for me, i don't have the controle with fan speed and swing...

contente of https://my.tado.com/api/v2/homes/xxxx/zones/xxxx/capabilities?ngsw-bypass=true

{
    "type": "AIR_CONDITIONING",
    "AUTO": {
        "fanLevel": [
            "LEVEL5",
            "LEVEL3",
            "LEVEL1",
            "LEVEL4",
            "AUTO",
            "LEVEL2"
        ],
        "verticalSwing": [
            "OFF",
            "MID_UP",
            "MID_DOWN",
            "ON",
            "DOWN",
            "UP",
            "MID"
        ],
        "horizontalSwing": [
            "OFF",
            "ON"
        ],
        "light": [
            "ON",
            "OFF"
        ]
    },
    "HEAT": {
        "temperatures": {
            "celsius": {
                "min": 16,
                "max": 31,
                "step": 1.0
            },
            "fahrenheit": {
                "min": 61,
                "max": 88,
                "step": 1.0
            }
        },
        "fanLevel": [
            "LEVEL5",
            "LEVEL3",
            "LEVEL1",
            "LEVEL4",
            "AUTO",
            "LEVEL2"
        ],
        "verticalSwing": [
            "OFF",
            "MID_UP",
            "MID_DOWN",
            "ON",
            "DOWN",
            "UP",
            "MID"
        ],
        "horizontalSwing": [
            "OFF",
            "ON"
        ],
        "light": [
            "ON",
            "OFF"
        ]
    },
    "FAN": {
        "temperatures": {
            "celsius": {
                "min": 16,
                "max": 31,
                "step": 1.0
            },
            "fahrenheit": {
                "min": 61,
                "max": 88,
                "step": 1.0
            }
        },
        "fanLevel": [
            "LEVEL5",
            "LEVEL3",
            "LEVEL1",
            "LEVEL4",
            "AUTO",
            "LEVEL2"
        ],
        "verticalSwing": [
            "OFF",
            "MID_UP",
            "MID_DOWN",
            "ON",
            "DOWN",
            "UP",
            "MID"
        ],
        "horizontalSwing": [
            "OFF",
            "ON"
        ],
        "light": [
            "ON",
            "OFF"
        ]
    },
    "COOL": {
        "temperatures": {
            "celsius": {
                "min": 16,
                "max": 31,
                "step": 1.0
            },
            "fahrenheit": {
                "min": 61,
                "max": 88,
                "step": 1.0
            }
        },
        "fanLevel": [
            "LEVEL5",
            "LEVEL3",
            "LEVEL1",
            "LEVEL4",
            "AUTO",
            "LEVEL2"
        ],
        "verticalSwing": [
            "OFF",
            "MID_UP",
            "MID_DOWN",
            "ON",
            "DOWN",
            "UP",
            "MID"
        ],
        "horizontalSwing": [
            "OFF",
            "ON"
        ],
        "light": [
            "ON",
            "OFF"
        ]
    },
    "DRY": {
        "temperatures": {
            "celsius": {
                "min": 16,
                "max": 31,
                "step": 1.0
            },
            "fahrenheit": {
                "min": 61,
                "max": 88,
                "step": 1.0
            }
        },
        "verticalSwing": [
            "OFF",
            "MID_UP",
            "MID_DOWN",
            "ON",
            "DOWN",
            "UP",
            "MID"
        ],
        "horizontalSwing": [
            "OFF",
            "ON"
        ],
        "light": [
            "ON",
            "OFF"
        ]
    },
    "initialStates": {
        "mode": "COOL",
        "modes": {
            "COOL": {
                "temperature": {
                    "celsius": 24,
                    "fahrenheit": 75
                },
                "fanLevel": "LEVEL3",
                "verticalSwing": "OFF",
                "horizontalSwing": "OFF",
                "light": "ON"
            },
            "HEAT": {
                "temperature": {
                    "celsius": 24,
                    "fahrenheit": 75
                },
                "fanLevel": "LEVEL3",
                "verticalSwing": "OFF",
                "horizontalSwing": "OFF",
                "light": "ON"
            },
            "DRY": {
                "temperature": {
                    "celsius": 24,
                    "fahrenheit": 75
                },
                "verticalSwing": "OFF",
                "horizontalSwing": "OFF",
                "light": "ON"
            },
            "FAN": {
                "temperature": {
                    "celsius": 24,
                    "fahrenheit": 75
                },
                "fanLevel": "LEVEL3",
                "verticalSwing": "OFF",
                "horizontalSwing": "OFF",
                "light": "ON"
            },
            "AUTO": {
                "fanLevel": "LEVEL3",
                "verticalSwing": "OFF",
                "horizontalSwing": "OFF",
                "light": "ON"
            }
        }
    }
}

devildant avatar Mar 18 '24 22:03 devildant

Any update on the fan level request?

UrbanOlsson avatar Apr 02 '24 09:04 UrbanOlsson

fixed in #117378

frenck avatar Jun 22 '24 16:06 frenck

Super to see that this has been added to the latest HASS 2024.7.0

It works for Mode: Heat and Mode: Cool. I can now control fan speed and Swing mode. GREAT!

But what does not work (I'm not sure if all are due to recent changes):

Mode: Switch from any mode to off I see the error: "Fan mode is not valid. Valid fan modes are: low, high, auto, medium."

Mode auto: If the temperature in the room is 20 degrees and you set it to 21 degrees, it changes the interface to cooling in stead of heating (and selects mode cool).

Mode heat cool: This does nothing and reverts back to mode off. I know this one worked, cause you set a low temp (for heating) and a high temp (for cooling).

Mode Dry: This does nothing and reverts back to mode off. I'm not sure if this one worked.

Mode Fan only: This mode does seem to work (it really selects fan only, not heat or cool). But Fan mode and Swing mode don't work. Fan mode stays high and Swing mode stays off, whatever you select.

I hope this helps: I have a TADO connected to a Daikin Aircoditioner with heatpump, model FTX50KMV1B

StreborStrebor avatar Jul 04 '24 10:07 StreborStrebor

I too see the same issues as StreborStrebor except that I'm not getting the error "Fan mode..." Having said that, I'm pretty happy that I can control the fan speed via automations now.

UrbanOlsson avatar Jul 04 '24 13:07 UrbanOlsson

Hi! Also very happy to see there is some progress and fan mode and swing mode are finally supported!

Unfortunately, I have the following issues:

  1. Fan mode and swing mode are only applied in HA when set in Tado, not when set in HA (the drop-downs are reset to the previous values) (please see attached video)

https://github.com/home-assistant/core/assets/115331/fe8ded3d-b445-4d86-9475-696ab7f879a7

I also tried to call the service directly, e.g. to set the swing mode:

service: climate.set_swing_mode
target:
  entity_id: climate.arbeitszimmer_klimaanlage
data:
  swing_mode: both

Result: no error is logged but the swing mode is not passed to Tado!

  1. If HVAC mode is set to off, I also see the error message: "Fan mode is not valid. Valid fan modes are: low, high, auto, medium." (please see attached video)

https://github.com/home-assistant/core/assets/115331/e469c1b9-5406-4bd7-b7bb-760eea0b74f0

Thanks a lot for looking into this @EtienneSOU!

felixmueller avatar Jul 04 '24 17:07 felixmueller

Fan mode and swing mode are only applied in HA when set in Tado, not when set in HA (the drop-downs are reset to the previous values) (please see attached video) I assume that EtienneSOU will need more info to fix that because on my side fan mode is applied when set in HA.

UrbanOlsson avatar Jul 04 '24 18:07 UrbanOlsson

Hello @felixmueller

It seems the behavior between fan modes and swing modes are different. In your video:

  • the fan mode when set from HA is always set on medium.
  • the swing mode when set from HA goes back directly to the previous mode.

For Fan mode: Can you try to set each mode and see the result: Is it ?

  • Low goes to medium
  • Auto goes to medium
  • High goes to medium
  • Medium stays to medium

For swing mode: Can you please try only vertical swing mode and only horizontal swing mode and tell me if it works ?

My AC is beeping when it receives a new input, maybe yours too. Do you hear anything when you're changing fan modes and swing modes ?

Also, if you are familiar with python and pip. Maybe you can help me debug by sending me the capabilities of your AC. It will tell me how Tado API works with your AC.

To do so you'll have to run a small python script after installing python-tado. You can install the package by doing pip install python-tado

and then run this python script

from PyTado.interface import Tado
t = Tado('[email protected]', 'passwordOfYourTadoAccount')
print(t.get_zones())
print(t.get_capabilities(ID)) # Insert the ID of your AC that you can get from the previous print

For the error message when turning OFF I'm making a PR.

Remarks:

  • I do not have an AC with horizontalSwing so it's hard for me te reproduce your issue
  • When you're changing AC modes from HA, usually you have to refresh Tado App to see the changes. When I'm testing with my phone, I always kill the app to notice the changes.

EtienneSOU avatar Jul 06 '24 17:07 EtienneSOU

Hi @EtienneSOU,

thanks for getting back to me and providing the additional requirements for debugging.

I will further analyze the issues in my setup using the python tool and will report back once I find some spare time tomorrow.

felixmueller avatar Jul 07 '24 09:07 felixmueller

Hi @EtienneSOU,

I managed to fire up python-tado on my iPad today using Pythonista and I extracted the requested AC capabilities for you:

{
   "type":"AIR_CONDITIONING",
   "COOL":{
      "temperatures":{
         "celsius":{
            "min":16,
            "max":32,
            "step":1.0
         },
         "fahrenheit":{
            "min":61,
            "max":90,
            "step":1.0
         }
      },
      "fanLevel":[
         "LEVEL1",
         "AUTO",
         "LEVEL3",
         "LEVEL2"
      ],
      "verticalSwing":[
         "OFF",
         "ON"
      ],
      "horizontalSwing":[
         "OFF",
         "ON"
      ],
      "light":[
         "OFF",
         "ON"
      ]
   },
   "HEAT":{
      "temperatures":{
         "celsius":{
            "min":16,
            "max":32,
            "step":1.0
         },
         "fahrenheit":{
            "min":61,
            "max":90,
            "step":1.0
         }
      },
      "fanLevel":[
         "LEVEL1",
         "AUTO",
         "LEVEL3",
         "LEVEL2"
      ],
      "verticalSwing":[
         "OFF",
         "ON"
      ],
      "horizontalSwing":[
         "OFF",
         "ON"
      ],
      "light":[
         "OFF",
         "ON"
      ]
   },
   "FAN":{
      "fanLevel":[
         "LEVEL1",
         "LEVEL3",
         "LEVEL2"
      ],
      "verticalSwing":[
         "OFF",
         "ON"
      ],
      "horizontalSwing":[
         "OFF",
         "ON"
      ],
      "light":[
         "OFF",
         "ON"
      ]
   },
   "AUTO":{
      "fanLevel":[
         "LEVEL1",
         "LEVEL3",
         "LEVEL2"
      ],
      "verticalSwing":[
         "OFF",
         "ON"
      ],
      "horizontalSwing":[
         "OFF",
         "ON"
      ],
      "light":[
         "OFF",
         "ON"
      ]
   },
   "DRY":{
      "temperatures":{
         "celsius":{
            "min":16,
            "max":32,
            "step":1.0
         },
         "fahrenheit":{
            "min":61,
            "max":90,
            "step":1.0
         }
      },
      "fanLevel":[
         "LEVEL1",
         "AUTO",
         "LEVEL3",
         "LEVEL2"
      ],
      "verticalSwing":[
         "OFF",
         "ON"
      ],
      "horizontalSwing":[
         "OFF",
         "ON"
      ],
      "light":[
         "OFF",
         "ON"
      ]
   },
   "initialStates":{
      "mode":"COOL",
      "modes":{
         "COOL":{
            "temperature":{
               "celsius":24,
               "fahrenheit":76
            },
            "fanLevel":"LEVEL2",
            "verticalSwing":"OFF",
            "horizontalSwing":"OFF",
            "light":"ON"
         },
         "HEAT":{
            "temperature":{
               "celsius":24,
               "fahrenheit":76
            },
            "fanLevel":"LEVEL2",
            "verticalSwing":"OFF",
            "horizontalSwing":"OFF",
            "light":"ON"
         },
         "DRY":{
            "temperature":{
               "celsius":24,
               "fahrenheit":76
            },
            "fanLevel":"LEVEL2",
            "verticalSwing":"OFF",
            "horizontalSwing":"OFF",
            "light":"ON"
         },
         "FAN":{
            "fanLevel":"LEVEL2",
            "verticalSwing":"OFF",
            "horizontalSwing":"OFF",
            "light":"ON"
         },
         "AUTO":{
            "fanLevel":"LEVEL2",
            "verticalSwing":"OFF",
            "horizontalSwing":"OFF",
            "light":"ON"
         }
      }
   }
}

I hope this helps solving the mentioned issues. Without further testing, I am quite sure that any changes of fan or swing mode triggered in HA are never processed on Tados side.

felixmueller avatar Jul 07 '24 11:07 felixmueller

Hello @felixmueller

If I correctly understood the problem. The fan modes (Low, Medium and High) and swing directions should work if you use HEAT or COOL mode instead of FAN mode. If you could confirm that, I could investigate to fix that issue that comes from python-tado and not from Home Assistant.

EtienneSOU avatar Jul 07 '24 16:07 EtienneSOU

Hi @EtienneSOU,

today I finally had time to further analyze my Tado AC problems:

First of all: Sorry for not testing it in the first place, but what you speculated is exactly right: the fan modes and swing modes can only be applied from HA to Tado in HEAT, COOL, or DRY mode, but not in FAN or AUTO mode! But it should be possible because Tado and my AC fully support it.

Secondly, there is one remaining problem in the modes where the settings work: I can't switch the swing mode from "both" to "horizontal" or "vertical". I have to switch it to "off" and then to "horizontal" or "vertical" to successfully apply the setting to Tado.

Thank you very much for taking care and for a deeper analysis to find a solution!

felixmueller avatar Jul 08 '24 11:07 felixmueller

Ok so the problem is coming from the python-tado library for fan levels not handled in FAN or AUTO. @erwindouna is working on a specific library to manage TADO API so maybe this would be easier to fix that issue.

Secondly, there is one remaining problem in the modes where the settings work: I can't switch the swing mode from "both" to "horizontal" or "vertical". I have to switch it to "off" and then to "horizontal" or "vertical" to successfully apply the setting to Tado.

I'll look into it.

EtienneSOU avatar Jul 08 '24 16:07 EtienneSOU