mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 11:43:34 +00:00
18 lines
326 B
ReStructuredText
18 lines
326 B
ReStructuredText
|
Discovering devices
|
||
|
===================
|
||
|
|
||
|
.. code-block::
|
||
|
|
||
|
import asyncio
|
||
|
from kasa import Discover
|
||
|
|
||
|
devices = asyncio.run(Discover.discover())
|
||
|
for addr, dev in devices.items():
|
||
|
asyncio.run(dev.update())
|
||
|
print(f"{addr} >> {dev}")
|
||
|
|
||
|
|
||
|
.. autoclass:: kasa.Discover
|
||
|
:members:
|
||
|
:undoc-members:
|