mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-14 03:18:26 +00:00
Convert to use poetry & pyproject.toml for dep & build management (#54)
* Convert to use poetry and pyproject.toml, update README * add some resources for contributors * minor adjustments * ci: separate tests from linting, run using poetry * add pytest-mock to dev requirements * combine running tests and reporting to codecov * generate both xml and html coverage reports * add codecov to dev dependencies
This commit is contained in:
@@ -10,7 +10,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
class SmartPlug(SmartDevice):
|
||||
"""Representation of a TP-Link Smart Switch.
|
||||
|
||||
Usage example when used a a synchronous library:
|
||||
Usage example:
|
||||
```python
|
||||
p = SmartPlug("192.168.1.105")
|
||||
|
||||
@@ -19,9 +19,10 @@ class SmartPlug(SmartDevice):
|
||||
|
||||
# change state of plug
|
||||
await p.turn_on()
|
||||
assert p.is_on is True
|
||||
await p.turn_off()
|
||||
|
||||
# query and print current state of plug
|
||||
# print current state of plug
|
||||
print(p.state_information)
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user