Metadata-Version: 2.1
Name: python-switchbot
Version: 1.0.0
Summary: A Python library to control SwitchBot devices connected to SwitchBot Hub
Home-page: https://github.com/jonghwanhyeon/python-switchbot
Author: Jonghwan Hyeon
Author-email: hyeon0145@gmail.com
License: MIT
Keywords: switchbot
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Home Automation
Description-Content-Type: text/markdown
Requires-Dist: pycognito
Requires-Dist: requests

# python-switchbot
A Python library to control SwitchBot devices connected to SwitchBot Hub

## Requirements
- Python 3.8+
- [pycognito](https://github.com/pvizeli/pycognito)
- [requests](https://requests.readthedocs.io)

## Installation
```python
pip install python-switchbot
```

## Usage
```python
from switchbot import SwitchBot

switchbot = SwitchBot('your@account.com')
switchbot.authenticate('yourpassword')

device = switchbot.device('AA:BB:CC:DD:EE:FF') # Device's BLE MAC
print(f'Current state: {device.state}')

# To turn off
device.turn('off') # -> device.state == 'off'

# To turn on
device.turn('on') # -> device.state == 'on'

# To toggle,
device.toggle()
```

