Skip to content

SeraphicCorp/py-switchbot-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-switchbot-api

An asynchronous library to use Switchbot API. Allows to use both devices and remotes.

Usage

token = "xxx"
secret = "yyy"

client = SwitchBotAPI(token, secret)
print(await client.list_devices())
print(await client.get_status('some-id'))
await client.send_command('some-id', {COMMAND})

Development

Install

poetry install

Lint

poetry run black switchbot_api/
poetry run mypy switchbot_api/