API

Asynchronous Python client for Tado.

class tadoasync.Tado(refresh_token: str | None = None, debug: bool | None = None, session: ClientSession | None = None, request_timeout: int = 10)

Bases: object

Base class for Tado.

async _check_device_activation() bool
_device_ready() None

Clear up after device activation.

_ensure_session() ClientSession

Return an active aiohttp ClientSession, creating one if needed.

async _refresh_auth() None

Refresh the authentication token.

async _request(uri: str | None = None, endpoint: str = 'my.tado.com/api/v2', data: dict[str, object] | None = None, method: HttpMethod = HttpMethod.GET) str

Handle a request to the Tado API.

async async_init() None

Asynchronous initialization for the Tado object.

async check_request_status(response_error: ClientResponseError, *, login: bool = False) None

Check the status of the request and raise the proper exception if needed.

async close() None

Close open client session.

async device_activation() None

Start the device activation process and get the refresh token.

property device_activation_status: DeviceActivationStatus

Return the device activation status.

property device_verification_url: str | None

Return the device verification URL.

async get_auto_geofencing_supported() bool | None

Return whether the Tado Home supports auto geofencing.

async get_capabilities(zone: int) Capabilities

Get the capabilities.

async get_device_info(serial_no: str, attribute: str | None = None) TemperatureOffset | Device

Get the device info.

async get_devices() list[tadoasync.models.Device]

Get the devices.

async get_home_state() HomeState

Get the home state.

async get_me() GetMe

Get the user information.

async get_mobile_devices() list[tadoasync.models.MobileDevice]

Get the mobile devices.

async get_weather() Weather

Get the weather.

async get_zone_state(zone_id: int) ZoneState

Get the zone state.

async get_zone_states() dict[str, tadoasync.models.ZoneState]

Get the zone states.

async get_zones() list[tadoasync.models.Zone]

Get the zones.

async login() None

Perform login to Tado.

async login_device_flow() DeviceActivationStatus

Login using device flow.

property refresh_token: str | None

Return the refresh token.

async reset_zone_overlay(zone: int) None

Reset the zone overlay.

async set_child_lock(serial_no: str, *, child_lock: bool) None

Set the child lock.

async set_meter_readings(reading: int, date: datetime | None = None) None

Set the meter readings.

async set_presence(presence: str) None

Set the presence.

async set_zone_overlay(zone: int, overlay_mode: str, set_temp: float | None = None, duration: int | None = None, device_type: str = 'HEATING', power: str = 'ON', mode: str | None = None, fan_speed: str | None = None, fan_level: str | None = None, vertical_swing: str | None = None, horizontal_swing: str | None = None, swing: str | None = None) None

Set the zone overlay.

async update_zone_data(data: ZoneState) None

Update the zone data.

exception tadoasync.TadoAuthenticationError

Bases: TadoError

Tado authentication exception.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tadoasync.TadoBadRequestError

Bases: TadoError

Tado bad request exception.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tadoasync.TadoConnectionError

Bases: TadoError

Tado connection exception.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tadoasync.TadoError

Bases: Exception

Base exception for Tado API.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tadoasync.TadoReadingError

Bases: TadoError

Tado reading exception.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tadoasync.TadoServerError

Bases: TadoError

Tado server exception.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.