An open API service indexing awesome lists of open source software.

https://github.com/webmatze/tado_client

a Ruby client for the tado thermostat API
https://github.com/webmatze/tado_client

ruby-client tado tado-api

Last synced: 4 months ago
JSON representation

a Ruby client for the tado thermostat API

Awesome Lists containing this project

README

        

# Tado API client

a Ruby client for the tado thermostat API

## Current and Planned Features

- [x] OAuth Authentification
- [x] Get user (me) data
- [ ] Get/Set temperature of a room

## Installation

Bundler

```ruby
# add to your Gemfile
gem 'tado_client'
```

as Gem:

```bash
gem install tado_client
```

## Usage (WIP)

Get an access token:

```ruby
access_token = Tado::OAuth.access_token(
username: 'username',
password: '',
client_id: 'client-id',
client_secret: ''
)
```

Set temperature for a home zone:

```ruby
require 'tado_client'

# Replace with your tado access token
access_token = 'your_access_token'

# Replace with your desired temperature
target_temperature = 21.5

# Create a new Tado::Client
client = Tado::Client.new(access_token: access_token)

# Get the user's data
me_data = client.me

# Get the first home and zone
home = me_data.homes.first
zone = home.zones.first

# Set the target temperature for the zone
zone.set_temperature(target_temperature)

```

This API will change while developing this gem.