GithubHelp home page GithubHelp logo

danelkay93 / tami4edgeapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guy293/tami4edgeapi

0.0 0.0 0.0 15 KB

Tami 4 Edge / Edge+ API In Python. In progress Home Assistant integration - https://github.com/home-assistant/core/pull/76756

Home Page: https://pypi.org/project/Tami4EdgeAPI/

License: MIT License

Python 100.00%

tami4edgeapi's Introduction

Tami 4 Edge / Edge+ API in Python

GitHub release workflow

tami4.png

Tami4EdgeAPI can be used to control Strauss'es Tami4 Edge / Edge+ devices.
You can boil the water, prepare drinks, get information about the filter or UV light and other information about the device.

Installing

pip install Tami4EdgeAPI

Authenticating

You first need to obtain a refresh_token by requesting an sms code to the phone you registered to the app with.

from Tami4EdgeAPI import Tami4EdgeAPI

# You must add the country code!
phone_number = "+972xxxxxxxxx"

Tami4EdgeAPI.request_otp(phone_number)
otp_code = input("Enter OTP: ")
refresh_token = Tami4EdgeAPI.submit_otp(otp_code)

Store the refresh_token somewhere safe, you will use it to authenticate with the API.

Usage

edge = Tami4EdgeAPI(refresh_token)
print(f"Bar Name: {edge.device.name}, Firmware Version: {edge.device.device_firmware}")

Boil Water

edge.boil_water()

Get User Drinks

drinks = edge.get_drinks()
for drink in drinks:
  print(drink.name)

Prepare A Drink

edge.prepare_drink(drink)

Get Filter / UV Information

water_quality = edge.get_water_quality()
water_quality.uv.last_replacement
water_quality.uv.upcoming_replacement
water_quality.uv.status
water_quality.filter.milli_litters_passed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.