wmalgadey / PyTado

Python binding for Tado web API. Pythonize your central heating!
GNU General Public License v3.0
76 stars 41 forks source link

Implement Zone Controller setting #54

Closed longwave closed 11 months ago

longwave commented 2 years ago

The Tado app allows each zone to select the device that calls for heat, or make a zone independent and never call for heat: https://support.tado.com/en/articles/4689126-how-does-tado-control-heating-zones-how-can-i-change-the-zone-controller-of-a-room

As the Tado TRVs are quite noisy, I make the bedroom an independent zone and set the temperature to 25° overnight - this means the valve is fully open and so the radiators still get warm if heat is required elsewhere in the house, while not waking us up with noise.

This mostly works except that it is difficult to get a good temperature in the room just before going to bed. It would be great to control this from Home Assistant, so I can set the zone to controlled temperatures during the day and then automatically switch to independent mode overnight.

The API request appears to be

PUT https://my.tado.com/api/v2/homes/HOME_ID/zones/ZONE_ID/control/heatingCircuit

with the following payload to set zone controller 1 (I only have one Tado heating zone) to call for heat:

{"circuitNumber":1}

or the following payload to make the device independent:

{"circuitNumber":null}
RobertMe commented 1 year ago

To add to the ticket description, a list of heating zones can be fetched with:

GET https://my.tado.com/api/v2/homes/HOME_ID/heatingCircuits

Which returns a list of devices/circuits/..., formatted:

[
  {
    "number": 1,
    "driverSerialNo": "<serial>",
    "driverShortSerialNo": "<serial>"
  }
]

I might try to look into this myself time permitting.